summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-04-10 02:40:49 +0200
committerBenjamin Otte <otte@redhat.com>2014-04-10 02:40:49 +0200
commit11e17262b744cd52c688942c1c94f93d4c6878f4 (patch)
treef65b1559eae86f406a8a4c7ad64478cb044f4b1d /tests
parent9cbd681174c80f43945546292400387d45b56b40 (diff)
downloadgtk+-11e17262b744cd52c688942c1c94f93d4c6878f4.tar.gz
testgtk: Don't use deprecated functions in scrolling test
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 21efb4f582..5c09532c22 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -9085,11 +9085,10 @@ void
create_scroll_test (GtkWidget *widget)
{
static GtkWidget *window = NULL;
- GtkWidget *action_area, *content_area;
+ GtkWidget *content_area;
GtkWidget *hbox;
GtkWidget *drawing_area;
GtkWidget *scrollbar;
- GtkWidget *button;
GtkAdjustment *adjustment;
GdkGeometry geometry;
GdkWindowHints geometry_mask;
@@ -9106,7 +9105,6 @@ create_scroll_test (GtkWidget *widget)
&window);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
- action_area = gtk_dialog_get_action_area (GTK_DIALOG (window));
gtk_window_set_title (GTK_WINDOW (window), "Scroll Test");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
@@ -9142,13 +9140,12 @@ create_scroll_test (GtkWidget *widget)
/* .. And create some buttons */
- button = gtk_button_new_with_label ("Quit");
- gtk_box_pack_start (GTK_BOX (action_area), button, TRUE, TRUE, 0);
-
- g_signal_connect_swapped (button, "clicked",
+ gtk_dialog_add_button (GTK_DIALOG (window),
+ "Quit",
+ GTK_RESPONSE_CLOSE);
+ g_signal_connect_swapped (window, "response",
G_CALLBACK (gtk_widget_destroy),
window);
- gtk_widget_show (button);
/* Set up gridded geometry */