@@ -13,7 +13,7 @@ use notify::{RecommendedWatcher, RecursiveMode, Watcher};
1313use std:: sync:: mpsc;
1414
1515use stitch:: core:: {
16- Node , Profile , ProfileScope , RustFilterOptions , RustOptions , WorkspaceSettings ,
16+ Node , Profile , ProfileScope , RustFilterOptions , RustOptions , SlintOptions , WorkspaceSettings ,
1717 apply_rust_filters, apply_slint_filters, clean_remove_regex, collapse_consecutive_blank_lines,
1818 collect_selected_paths, compile_remove_regex_opt, delete_profile, ensure_profiles_dirs,
1919 ensure_workspace_dir, gather_paths_set, is_ancestor_of, is_rust_file_path, is_slint_file_path,
@@ -209,6 +209,9 @@ pub fn on_select_folder(app: &AppWindow, state: &SharedState) {
209209 app. set_rust_remove_doc_comments ( ws. rust . rust_remove_doc_comments ) ;
210210 app. set_rust_function_signatures_only ( ws. rust . rust_function_signatures_only ) ;
211211 app. set_rust_signatures_only_filter ( ws. rust . rust_signatures_only_filter . clone ( ) . into ( ) ) ;
212+ // Slint settings
213+ app. set_slint_remove_line_comments ( ws. slint . slint_remove_line_comments ) ;
214+ app. set_slint_remove_block_comments ( ws. slint . slint_remove_block_comments ) ;
212215
213216 state. borrow_mut ( ) . workspace_baseline = Some ( ws. clone ( ) ) ;
214217 } else {
@@ -227,6 +230,10 @@ pub fn on_select_folder(app: &AppWindow, state: &SharedState) {
227230 rust_function_signatures_only : app. get_rust_function_signatures_only ( ) ,
228231 rust_signatures_only_filter : app. get_rust_signatures_only_filter ( ) . to_string ( ) ,
229232 } ,
233+ slint : SlintOptions {
234+ slint_remove_line_comments : app. get_slint_remove_line_comments ( ) ,
235+ slint_remove_block_comments : app. get_slint_remove_block_comments ( ) ,
236+ } ,
230237 } ;
231238 let _ = save_workspace ( & dir, & seed) ;
232239 state. borrow_mut ( ) . workspace_baseline = Some ( seed) ;
@@ -1526,6 +1533,10 @@ fn capture_profile_from_ui(app: &AppWindow, state: &SharedState, name: &str) ->
15261533 rust_function_signatures_only : app. get_rust_function_signatures_only ( ) ,
15271534 rust_signatures_only_filter : app. get_rust_signatures_only_filter ( ) . to_string ( ) ,
15281535 } ,
1536+ slint : SlintOptions {
1537+ slint_remove_line_comments : app. get_slint_remove_line_comments ( ) ,
1538+ slint_remove_block_comments : app. get_slint_remove_block_comments ( ) ,
1539+ } ,
15291540 } ;
15301541
15311542 // NOTE: Preserve root selection by storing an empty relative path ("")
@@ -1573,6 +1584,8 @@ fn apply_profile_to_ui(app: &AppWindow, state: &SharedState, profile: &Profile)
15731584 . clone ( )
15741585 . into ( ) ,
15751586 ) ;
1587+ app. set_slint_remove_line_comments ( profile. settings . slint . slint_remove_line_comments ) ;
1588+ app. set_slint_remove_block_comments ( profile. settings . slint . slint_remove_block_comments ) ;
15761589
15771590 app. set_profile_name ( profile. name . clone ( ) . into ( ) ) ;
15781591
@@ -1683,6 +1696,10 @@ pub fn on_save_profile_current(app: &AppWindow, state: &SharedState) {
16831696 rust_function_signatures_only : app. get_rust_function_signatures_only ( ) ,
16841697 rust_signatures_only_filter : app. get_rust_signatures_only_filter ( ) . to_string ( ) ,
16851698 } ,
1699+ slint : SlintOptions {
1700+ slint_remove_line_comments : app. get_slint_remove_line_comments ( ) ,
1701+ slint_remove_block_comments : app. get_slint_remove_block_comments ( ) ,
1702+ } ,
16861703 } ;
16871704
16881705 let _ = save_workspace ( & project_root, & ws) ;
@@ -1839,6 +1856,8 @@ fn profiles_equal(a: &Profile, b: &Profile) -> bool {
18391856 || sa. rust . rust_remove_doc_comments != sb. rust . rust_remove_doc_comments
18401857 || sa. rust . rust_function_signatures_only != sb. rust . rust_function_signatures_only
18411858 || sa. rust . rust_signatures_only_filter != sb. rust . rust_signatures_only_filter
1859+ || sa. slint . slint_remove_line_comments != sb. slint . slint_remove_line_comments
1860+ || sa. slint . slint_remove_block_comments != sb. slint . slint_remove_block_comments
18421861 {
18431862 return false ;
18441863 }
@@ -1881,6 +1900,10 @@ fn update_save_button_state(app: &AppWindow, state: &SharedState) {
18811900 rust_function_signatures_only : app. get_rust_function_signatures_only ( ) ,
18821901 rust_signatures_only_filter : app. get_rust_signatures_only_filter ( ) . to_string ( ) ,
18831902 } ,
1903+ slint : SlintOptions {
1904+ slint_remove_line_comments : app. get_slint_remove_line_comments ( ) ,
1905+ slint_remove_block_comments : app. get_slint_remove_block_comments ( ) ,
1906+ } ,
18841907 } ;
18851908
18861909 let baseline_opt = { state. borrow ( ) . workspace_baseline . clone ( ) } ;
@@ -2043,6 +2066,7 @@ fn workspace_settings_equal(a: &WorkspaceSettings, b: &WorkspaceSettings) -> boo
20432066 && a. hierarchy_only == b. hierarchy_only
20442067 && a. dirs_only == b. dirs_only
20452068 && a. rust == b. rust
2069+ && a. slint == b. slint
20462070 // Note: we intentionally ignore `current_profile` here for dirtiness comparison
20472071}
20482072
0 commit comments