Commit c34a2d65 authored by Alberto Ruiz's avatar Alberto Ruiz Committed by Matthias Clasen

GtkFontChooser: Use GTK_DISABLE_DEPRECATED on the test code

parent 5eb614a2
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment