[gtk+] testgtk: Don't use deprecated functions in scrolling test
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testgtk: Don't use deprecated functions in scrolling test
- Date: Thu, 10 Apr 2014 00:41:21 +0000 (UTC)
commit 11e17262b744cd52c688942c1c94f93d4c6878f4
Author: Benjamin Otte <otte redhat com>
Date: Thu Apr 10 02:40:49 2014 +0200
testgtk: Don't use deprecated functions in scrolling test
tests/testgtk.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 21efb4f..5c09532 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]