diff --git a/ChangeLog b/ChangeLog index c6f3b4e1d2..7664d9dc29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-07-15 Matthias Clasen + + * tests/testfilechooserbutton.c: Add an "Unselect all" button. + 2008-07-15 Matthias Clasen Bug 507394 – mem leak from gtk_selection_add_targets diff --git a/tests/testfilechooserbutton.c b/tests/testfilechooserbutton.c index ee18d7fb81..0b9a6549ac 100644 --- a/tests/testfilechooserbutton.c +++ b/tests/testfilechooserbutton.c @@ -142,6 +142,13 @@ del_pwds_parent_as_shortcut_clicked_cb (GtkWidget *button, } } +static void +unselect_all_clicked_cb (GtkWidget *button, + gpointer user_data) +{ + gtk_file_chooser_unselect_all (user_data); +} + static void tests_button_clicked_cb (GtkButton *real_button, gpointer user_data) @@ -183,6 +190,12 @@ tests_button_clicked_cb (GtkButton *real_button, gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0); gtk_widget_show (button); + button = gtk_button_new_with_label ("Unselect all"); + g_signal_connect (button, "clicked", + G_CALLBACK (unselect_all_clicked_cb), user_data); + gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0); + gtk_widget_show (button); + g_signal_connect (tests, "delete-event", G_CALLBACK (delete_event_cb), NULL); g_object_set_data (user_data, "tests-dialog", tests); }