mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Add an "Unselect all" button
svn path=/trunk/; revision=20832
This commit is contained in:
parent
69dcbadd00
commit
bae6c5576f
@ -1,3 +1,7 @@
|
|||||||
|
2008-07-15 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* tests/testfilechooserbutton.c: Add an "Unselect all" button.
|
||||||
|
|
||||||
2008-07-15 Matthias Clasen <mclasen@redhat.com>
|
2008-07-15 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
Bug 507394 – mem leak from gtk_selection_add_targets
|
Bug 507394 – mem leak from gtk_selection_add_targets
|
||||||
|
@ -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
|
static void
|
||||||
tests_button_clicked_cb (GtkButton *real_button,
|
tests_button_clicked_cb (GtkButton *real_button,
|
||||||
gpointer user_data)
|
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_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
|
||||||
gtk_widget_show (button);
|
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_signal_connect (tests, "delete-event", G_CALLBACK (delete_event_cb), NULL);
|
||||||
g_object_set_data (user_data, "tests-dialog", tests);
|
g_object_set_data (user_data, "tests-dialog", tests);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user