Commit cd033e6f authored by Matthias Clasen's avatar Matthias Clasen

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.
parent fc8516fe
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment