diff options
author | Benjamin Otte <otte@redhat.com> | 2011-11-07 15:02:34 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-12-16 20:09:14 +0100 |
commit | 523a45d927c3c43f1f80feb5211b12c8231e70d1 (patch) | |
tree | 223e03aad5883573d5ad5263c6f5a4aa80d1dc03 /gtk/gtkfilechooserentry.c | |
parent | 57766f194892fc670396bd79a28af71cf412c198 (diff) | |
download | gtk+-523a45d927c3c43f1f80feb5211b12c8231e70d1.tar.gz |
filechooserentry: Don't show files when selecting directory
We don't want to complete on files when they're not supposed to be
selectable.
Diffstat (limited to 'gtk/gtkfilechooserentry.c')
-rw-r--r-- | gtk/gtkfilechooserentry.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c index 88ddc30c41..4219f2f666 100644 --- a/gtk/gtkfilechooserentry.c +++ b/gtk/gtkfilechooserentry.c @@ -497,6 +497,9 @@ populate_completion_store (GtkFileChooserEntry *chooser_entry) _gtk_file_system_model_set_filter_folders (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store), TRUE); + _gtk_file_system_model_set_show_files (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store), + chooser_entry->action == GTK_FILE_CHOOSER_ACTION_OPEN || + chooser_entry->action == GTK_FILE_CHOOSER_ACTION_SAVE); gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (chooser_entry->completion_store), DISPLAY_NAME_COLUMN, GTK_SORT_ASCENDING); @@ -815,6 +818,11 @@ _gtk_file_chooser_entry_set_action (GtkFileChooserEntry *chooser_entry, gtk_entry_completion_set_popup_single_match (comp, TRUE); break; } + + if (chooser_entry->completion_store) + _gtk_file_system_model_set_show_files (GTK_FILE_SYSTEM_MODEL (chooser_entry->completion_store), + action == GTK_FILE_CHOOSER_ACTION_OPEN || + action == GTK_FILE_CHOOSER_ACTION_SAVE); } } |