[poppler] glib/demo
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Mon Jul 27 05:58:15 PDT 2015
glib/demo/main.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
New commits:
commit a7b1151ce7a14d359d85bacfe02352cdeb8d9a8f
Author: Hib Eris <hib at hiberis.nl>
Date: Sun Jul 26 10:38:37 2015 +0200
glib-demo: Prefer gtk_label_set_{x,y}align() over deprecated gtk_misc_set_alignment()
https://bugs.freedesktop.org/show_bug.cgi?id=88788
diff --git a/glib/demo/main.c b/glib/demo/main.c
index 24c7b51..e2128eb 100644
--- a/glib/demo/main.c
+++ b/glib/demo/main.c
@@ -214,8 +214,12 @@ pgd_demo_get_auth_dialog (GFile *uri_file)
gtk_widget_show (main_vbox);
label = gtk_label_new (NULL);
- gtk_widget_set_halign (label, GTK_ALIGN_START);
- gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+#if GTK_CHECK_VERSION(3, 15, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
file_name = g_file_get_basename (uri_file);
format = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s",
@@ -242,8 +246,12 @@ pgd_demo_get_auth_dialog (GFile *uri_file)
gtk_widget_show (table);
label = gtk_label_new_with_mnemonic ("_Password:");
- gtk_widget_set_halign (label, GTK_ALIGN_START);
- gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
+#if GTK_CHECK_VERSION(3, 15, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
password_entry = gtk_entry_new ();
gtk_entry_set_visibility (GTK_ENTRY (password_entry), FALSE);
More information about the poppler
mailing list