[gtk+] testgtk: Don't use deprecated functions in flipping test



commit 27770485f8612bdaae04b090903005941f567495
Author: Benjamin Otte <otte redhat com>
Date:   Thu Apr 10 14:28:44 2014 +0200

    testgtk: Don't use deprecated functions in flipping test

 tests/testgtk.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 5c09532..cd608bd 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -5202,8 +5202,8 @@ void
 create_flipping (GtkWidget *widget)
 {
   static GtkWidget *window = NULL;
-  GtkWidget *check_button, *button;
-  GtkWidget *action_area, *content_area;
+  GtkWidget *check_button;
+  GtkWidget *content_area;
 
   if (!window)
     {
@@ -5217,7 +5217,6 @@ create_flipping (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), "Bidirectional Flipping");
 
@@ -5250,10 +5249,8 @@ create_flipping (GtkWidget *widget)
                          create_forward_back ("Right-to-Left", GTK_TEXT_DIR_RTL),
                          TRUE, TRUE, 0);
 
-      button = gtk_button_new_with_label ("Close");
-      g_signal_connect_swapped (button, "clicked",
-                               G_CALLBACK (gtk_widget_destroy), window);
-      gtk_box_pack_start (GTK_BOX (action_area), button, TRUE, TRUE, 0);
+      gtk_dialog_add_button (GTK_DIALOG (window), "Close", GTK_RESPONSE_CLOSE);
+      g_signal_connect (window, "response", G_CALLBACK (gtk_widget_destroy), NULL);
     }
   
   if (!gtk_widget_get_visible (window))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]