File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed
druid-shell/src/platform/gtk Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ This means that druid no longer requires cairo on macOS and uses Core Graphics i
103103- GTK: Support disabled menu items. ([ #897 ] by [ @jneem ] )
104104- X11: Support individual window closing. ([ #900 ] by [ @xStrom ] )
105105- X11: Support ` Application::quit ` . ([ #900 ] by [ @xStrom ] )
106- - GTK: Support file filters in open/save dialogs. ([ #903 ] by [ @jneem ] )
106+ - GTK: Support file filters in open/save dialogs. ([ #903 ] by [ @jneem ] , [ # 957 ] by [ @ xStrom ] )
107107- GTK: Support DPI values other than 96. ([ #904 ] by [ @xStrom ] )
108108- Windows: Removed flashes of white background at the edge of the window when resizing. ([ #915 ] by [ @xStrom ] )
109109- Windows: Reduced chance of white flash when opening a new window. ([ #916 ] by [ @xStrom ] )
@@ -231,6 +231,7 @@ This means that druid no longer requires cairo on macOS and uses Core Graphics i
231231[ #951 ] : https://github.com/xi-editor/druid/pull/951
232232[ #953 ] : https://github.com/xi-editor/druid/pull/953
233233[ #954 ] : https://github.com/xi-editor/druid/pull/954
234+ [ #957 ] : https://github.com/xi-editor/druid/pull/957
234235[ #959 ] : https://github.com/xi-editor/druid/pull/959
235236[ #961 ] : https://github.com/xi-editor/druid/pull/961
236237[ #963 ] : https://github.com/xi-editor/druid/pull/963
Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ pub(crate) fn get_file_dialog_path(
5353
5454 dialog. set_show_hidden ( options. show_hidden ) ;
5555
56- dialog. set_select_multiple ( options. multi_selection ) ;
56+ if action != FileChooserAction :: Save {
57+ dialog. set_select_multiple ( options. multi_selection ) ;
58+ }
5759
5860 // Don't set the filters when showing the folder selection dialog,
5961 // because then folder traversing won't work.
@@ -76,15 +78,9 @@ pub(crate) fn get_file_dialog_path(
7678 }
7779 }
7880
79- if let Some ( default_file_type) = & options. default_type {
80- if options. allowed_types . is_some ( ) && !found_default_filter {
81- // It's ok to set a default file filter without providing a list of
82- // allowed filters, but it's not ok (or at least, doesn't work in gtk)
83- // to provide a default filter that isn't in the (present) list
84- // of allowed filters.
85- log:: warn!( "default file type not found in allowed types" ) ;
86- } else if !found_default_filter {
87- dialog. set_filter ( & file_filter ( default_file_type) ) ;
81+ if let Some ( dt) = & options. default_type {
82+ if !found_default_filter {
83+ log:: warn!( "The default type {:?} is not present in allowed types." , dt) ;
8884 }
8985 }
9086 }
You can’t perform that action at this time.
0 commit comments