mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
Test folder filtering
Add a filter to testfilechooser that can demonstrate folder filtering on common directories, such as Documents or Downloads.
This commit is contained in:
parent
226450785a
commit
7bfcb065df
@ -577,6 +577,11 @@ main (int argc, char **argv)
|
||||
gtk_file_filter_add_mime_type (filter, "image/png");
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_set_name (filter, "Starts with D");
|
||||
gtk_file_filter_add_pattern (filter, "D*");
|
||||
gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
|
||||
|
||||
g_signal_connect (dialog, "notify::filter",
|
||||
G_CALLBACK (filter_changed), NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user