From 85bf1df7e535f97d1b280cb9b256018d4aed7b70 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Sun, 25 Jan 2015 13:10:31 +0100 Subject: [PATCH] [glib] Remove use of deprecated GtkAlignment from demo/info.cc https://bugs.freedesktop.org/show_bug.cgi?id=88788 --- glib/demo/info.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/glib/demo/info.cc b/glib/demo/info.cc index 590ddc7..a396ba1 100644 --- a/glib/demo/info.cc +++ b/glib/demo/info.cc @@ -143,7 +143,7 @@ pgd_info_create_widget (PopplerDocument *document) { GtkWidget *vbox; GtkWidget *label; - GtkWidget *frame, *alignment, *table; + GtkWidget *frame, *table; gchar *str; gchar *title, *format, *author, *subject; gchar *keywords, *creator, *producer; @@ -196,13 +196,17 @@ pgd_info_create_widget (PopplerDocument *document) gtk_label_set_markup (GTK_LABEL (label), "Document properties"); gtk_frame_set_label_widget (GTK_FRAME (frame), label); gtk_widget_show (label); - - alignment = gtk_alignment_new (0.5, 0.5, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 12, 5); - gtk_container_add (GTK_CONTAINER (frame), alignment); - gtk_widget_show (alignment); table = gtk_grid_new (); + gtk_widget_set_margin_top (table, 5); + gtk_widget_set_margin_bottom (table, 5); +#if GTK_CHECK_VERSION(3, 12, 0) + gtk_widget_set_margin_start (table, 12); + gtk_widget_set_margin_end (table, 5); +#else + gtk_widget_set_margin_left (table, 12); + gtk_widget_set_margin_right (table, 5); +#endif gtk_grid_set_column_spacing (GTK_GRID (table), 6); gtk_grid_set_row_spacing (GTK_GRID (table), 6); @@ -261,7 +265,7 @@ pgd_info_create_widget (PopplerDocument *document) /* TODO: view_prefs */ - gtk_container_add (GTK_CONTAINER (alignment), table); + gtk_container_add (GTK_CONTAINER (frame), table); gtk_widget_show (table); gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); -- 1.9.1