summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMorten Welinder <terra@gnome.org>2004-03-10 14:56:28 +0000
committerMorten Welinder <mortenw@src.gnome.org>2004-03-10 14:56:28 +0000
commit4061a444011e64cffaa1f85ac21fec7831c8d62c (patch)
tree8c75b612bcc98e98d11a284cfc652a5be6e7c308 /tests
parentb8286437b423a7d0e5378a8d2f6cf7c930e482d6 (diff)
downloadgdk-pixbuf-4061a444011e64cffaa1f85ac21fec7831c8d62c.tar.gz
Add support for --multiple.
2004-03-10 Morten Welinder <terra@gnome.org> * tests/testfilechooser.c (main): Add support for --multiple.
Diffstat (limited to 'tests')
-rw-r--r--tests/testfilechooser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index 6b7318dcf..dbb573d28 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -380,6 +380,7 @@ main (int argc, char **argv)
GtkFileFilter *filter;
GtkWidget *preview_vbox;
int i;
+ gboolean multiple = FALSE;
gtk_init (&argc, &argv);
@@ -396,11 +397,14 @@ main (int argc, char **argv)
action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
else if (! strcmp ("--action=create_folder", argv[i]))
action = GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER;
+ else if (! strcmp ("--multiple", argv[i]))
+ multiple = TRUE;
}
dialog = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
"action", action,
"file-system-backend", "gnome-vfs",
+ "select-multiple", multiple,
NULL);
switch (action)
{
@@ -493,6 +497,7 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (control_window), vbbox);
button = gtk_button_new_with_mnemonic ("_Select all");
+ gtk_widget_set_sensitive (button, multiple);
gtk_container_add (GTK_CONTAINER (vbbox), button);
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_file_chooser_select_all), dialog);