[gtk+/font-chooser: 69/86] GtkFontChooser: Use GTK_DISABLE_DEPRECATED on the test code



commit 01135e0f2a71f2f661286e52703cb9f6f0ed14ca
Author: Alberto Ruiz <aruiz gnome org>
Date:   Wed May 4 00:29:38 2011 +0100

    GtkFontChooser: Use GTK_DISABLE_DEPRECATED on the test code

 tests/testfontselection.c       |    3 +++
 tests/testfontselectiondialog.c |    9 +++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/tests/testfontselection.c b/tests/testfontselection.c
index 34ca213..1a79332 100644
--- a/tests/testfontselection.c
+++ b/tests/testfontselection.c
@@ -49,6 +49,7 @@ main (int argc, char *argv[])
   hbox = gtk_hbox_new (FALSE, 6);
   gtk_container_add (GTK_CONTAINER (window), hbox);
 
+#ifndef GTK_DISABLE_DEPRECATED
   g_object_ref (gtk_font_selection_get_size_list (GTK_FONT_SELECTION (fontsel)));
   g_object_ref (gtk_font_selection_get_family_list (GTK_FONT_SELECTION (fontsel)));
   g_object_ref (gtk_font_selection_get_face_list (GTK_FONT_SELECTION (fontsel)));
@@ -56,6 +57,8 @@ main (int argc, char *argv[])
   gtk_container_add (GTK_CONTAINER (hbox), gtk_font_selection_get_size_list (GTK_FONT_SELECTION (fontsel)));
   gtk_container_add (GTK_CONTAINER (hbox), gtk_font_selection_get_family_list (GTK_FONT_SELECTION (fontsel)));
   gtk_container_add (GTK_CONTAINER (hbox), gtk_font_selection_get_face_list (GTK_FONT_SELECTION (fontsel)));
+#endif 
+
   gtk_container_add (GTK_CONTAINER (hbox), fontsel);
 
   gtk_widget_show_all (window);
diff --git a/tests/testfontselectiondialog.c b/tests/testfontselectiondialog.c
index 3093964..fafee27 100644
--- a/tests/testfontselectiondialog.c
+++ b/tests/testfontselectiondialog.c
@@ -24,11 +24,20 @@ int
 main (int argc, char *argv[])
 {
   GtkWidget *dialog;
+  GtkWidget *ok;
+  GtkWidget *select;
 
   gtk_init (&argc, &argv);
 
   dialog = gtk_font_selection_dialog_new (NULL);
 
+#ifndef GTK_DISABLE_DEPRECATED
+  ok = gtk_font_selection_dialog_get_ok_button (GTK_FONT_SELECTION_DIALOG (dialog));
+  select = gtk_font_selection_dialog_get_select_button (GTK_FONT_SELECTION_DIALOG (dialog));
+
+  g_assert (ok == select);
+#endif
+
   gtk_dialog_run (GTK_DIALOG (dialog));
 
   gtk_widget_destroy (dialog);



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