From 61ca7a29e804243bcda0885cf0a0ab9f87c896c5 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Sun, 25 Jan 2015 18:17:49 +0100 Subject: [PATCH] Prefer gtk_label_set_{x,y}align() over deprecated gtk_misc_set_alignment() https://bugs.freedesktop.org/show_bug.cgi?id=88788 --- glib/demo/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/glib/demo/main.c b/glib/demo/main.c index ee0d3ef..e2128eb 100644 --- a/glib/demo/main.c +++ b/glib/demo/main.c @@ -214,7 +214,12 @@ pgd_demo_get_auth_dialog (GFile *uri_file) gtk_widget_show (main_vbox); label = gtk_label_new (NULL); +#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 ("%s\n\n%s", @@ -241,7 +246,12 @@ pgd_demo_get_auth_dialog (GFile *uri_file) gtk_widget_show (table); label = gtk_label_new_with_mnemonic ("_Password:"); +#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); -- 2.1.4