diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-09-09 12:46:25 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-09-09 12:46:25 +0000 |
commit | 375537fff8998411434f4fa237e5adc6f4e7029a (patch) | |
tree | 74988e32b248fb99f4b41035d9e7d9b98c83878a /tests/testfilechooser.c | |
parent | e0b2ead302cfab730f65f6584caf8d2c786250f8 (diff) | |
download | gtk+-375537fff8998411434f4fa237e5adc6f4e7029a.tar.gz |
Update sensitivity of the "Select all" button.
2004-09-09 Matthias Clasen <mclasen@redhat.com>
* tests/testfilechooser.c (main): Update sensitivity of the "Select all"
button.
Diffstat (limited to 'tests/testfilechooser.c')
-rw-r--r-- | tests/testfilechooser.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index b792db9cd1..edcb7a6b74 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -375,6 +375,18 @@ kill_dependent (GtkWindow *win, GtkObject *dep) g_object_unref (dep); } +static void +notify_multiple_cb (GtkWidget *dialog, + GParamSpec *pspec, + GtkWidget *button) +{ + gboolean multiple; + + multiple = gtk_file_chooser_get_select_multiple (GTK_FILE_CHOOSER (dialog)); + + gtk_widget_set_sensitive (button, multiple); +} + int main (int argc, char **argv) { @@ -510,6 +522,8 @@ main (int argc, char **argv) gtk_container_add (GTK_CONTAINER (vbbox), button); g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_file_chooser_select_all), dialog); + g_signal_connect (dialog, "notify::multiple", + G_CALLBACK (notify_multiple_cb), button); button = gtk_button_new_with_mnemonic ("_Unselect all"); gtk_container_add (GTK_CONTAINER (vbbox), button); |