diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-04-05 22:09:22 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-04-05 22:09:22 -0400 |
commit | cd033e6f07898cc8b2427c0ab345d3ee004ace07 (patch) | |
tree | 9e2f691dce874da14c5f4db54666d4a20bbbcd90 /tests/testfilechooser.c | |
parent | fc8516fe75089459c09e750db0c5d6ae643dea63 (diff) | |
download | gtk+-cd033e6f07898cc8b2427c0ab345d3ee004ace07.tar.gz |
testfilechooser: Improve filter setup
It is not ideal when the default filter filters away
all files, so change things to select the 'all files'
filter by default.
Diffstat (limited to 'tests/testfilechooser.c')
-rw-r--r-- | tests/testfilechooser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index c912e70329..389eb2212b 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -614,6 +614,9 @@ main (int argc, char **argv) gtk_file_filter_add_pattern (filter, "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); + /* Make this filter the default */ + gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter); + filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, "No backup files"); gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_DISPLAY_NAME, @@ -629,9 +632,6 @@ main (int argc, char **argv) g_signal_connect (dialog, "notify::filter", G_CALLBACK (filter_changed), NULL); - /* Make this filter the default */ - gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter); - filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, "PNG and JPEG"); gtk_file_filter_add_mime_type (filter, "image/jpeg"); |