fix: honor properties.showHiddenFiles on Linux (#15503)
Previously the code only set the GtkFileChooser's property if `properties.showHiddenFiles` was set. This PR unconditionally sets the GtkFileChooser's property so that hidden files will be hidden if `properties.showHiddenFiles` was not set.
This commit is contained in:
parent
a8f2646ba6
commit
feb31d088b
1 changed files with 8 additions and 4 deletions
|
@ -94,10 +94,14 @@ class FileChooserDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupProperties(int properties) {
|
void SetupProperties(int properties) {
|
||||||
if (properties & FILE_DIALOG_MULTI_SELECTIONS)
|
const auto hasProp = [properties](FileDialogProperty prop) {
|
||||||
gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dialog()), TRUE);
|
return gboolean((properties & prop) != 0);
|
||||||
if (properties & FILE_DIALOG_SHOW_HIDDEN_FILES)
|
};
|
||||||
g_object_set(dialog(), "show-hidden", TRUE, NULL);
|
auto* file_chooser = GTK_FILE_CHOOSER(dialog());
|
||||||
|
gtk_file_chooser_set_select_multiple(file_chooser,
|
||||||
|
hasProp(FILE_DIALOG_MULTI_SELECTIONS));
|
||||||
|
gtk_file_chooser_set_show_hidden(file_chooser,
|
||||||
|
hasProp(FILE_DIALOG_SHOW_HIDDEN_FILES));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunAsynchronous() {
|
void RunAsynchronous() {
|
||||||
|
|
Loading…
Reference in a new issue