diff options
author | Morten Welinder <terra@gnome.org> | 2004-03-10 14:56:28 +0000 |
---|---|---|
committer | Morten Welinder <mortenw@src.gnome.org> | 2004-03-10 14:56:28 +0000 |
commit | 4061a444011e64cffaa1f85ac21fec7831c8d62c (patch) | |
tree | 8c75b612bcc98e98d11a284cfc652a5be6e7c308 /tests/testfilechooser.c | |
parent | b8286437b423a7d0e5378a8d2f6cf7c930e482d6 (diff) | |
download | gtk+-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/testfilechooser.c')
-rw-r--r-- | tests/testfilechooser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 6b7318dcf4..dbb573d28a 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); |