[gtk+/filechooser-filtered-folders] Test folder filtering
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/filechooser-filtered-folders] Test folder filtering
- Date: Sun, 15 Jul 2012 01:18:22 +0000 (UTC)
commit aff313788a3d7641ba51b4b482ea288342c0d7f6
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jul 14 21:16:39 2012 -0400
Test folder filtering
Add a filter to testfilechooser that can demonstrate folder
filtering on common directories, such as Documents or Downloads.
tests/testfilechooser.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index fec10f5..fdee032 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]