[gtk+/dialogs: 24/25] Fix up testrecentchooser



commit 67d8fd8dab27c64ef68e2a18419c3a33d4dbefe6
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 15 06:03:13 2014 -0500

    Fix up testrecentchooser
    
    Make this test construct its dialog in a way that
    picks up the use-header setting.

 tests/testrecentchooser.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/tests/testrecentchooser.c b/tests/testrecentchooser.c
index 4c48599..9572694 100644
--- a/tests/testrecentchooser.c
+++ b/tests/testrecentchooser.c
@@ -125,16 +125,16 @@ main (int   argc,
        multiple = TRUE;
     }
 
-  dialog = g_object_new (GTK_TYPE_RECENT_CHOOSER_DIALOG,
-                        "select-multiple", multiple,
-                         "show-tips", TRUE,
-                         "show-icons", TRUE,
-                        NULL);
-  gtk_window_set_title (GTK_WINDOW (dialog), "Select a file");
-  gtk_dialog_add_buttons (GTK_DIALOG (dialog),
-                         "_Cancel", GTK_RESPONSE_CANCEL,
-                         "_Open", GTK_RESPONSE_OK,
-                         NULL);
+  dialog = gtk_recent_chooser_dialog_new ("Select a file",
+                                          GTK_WINDOW (dialog),
+                                         "_Cancel", GTK_RESPONSE_CANCEL,
+                                          "_Open", GTK_RESPONSE_OK,
+                                          NULL);
+  g_object_set (dialog,
+               "select-multiple", multiple,
+                "show-tips", TRUE,
+                "show-icons", TRUE,
+               NULL);
   
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 


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