summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-20 13:27:56 +0300
committermonsta <[email protected]>2016-01-20 13:27:56 +0300
commitd517ddf7ec16e07187ef393e9bc700b25ad7ce3a (patch)
treee5919bc4bd19014c0f49f6bd728d5cc8aa622af7 /src
parent13904e44d00ee57abc3fb77c1d501df536db2a7a (diff)
downloadmate-polkit-d517ddf7ec16e07187ef393e9bc700b25ad7ce3a.tar.bz2
mate-polkit-d517ddf7ec16e07187ef393e9bc700b25ad7ce3a.tar.xz
[GTK+3] fix deprecated usage of GtkMisc
Diffstat (limited to 'src')
-rw-r--r--src/polkitmateauthenticationdialog.c41
1 files changed, 38 insertions, 3 deletions
diff --git a/src/polkitmateauthenticationdialog.c b/src/polkitmateauthenticationdialog.c
index b8267a4..391a915 100644
--- a/src/polkitmateauthenticationdialog.c
+++ b/src/polkitmateauthenticationdialog.c
@@ -519,7 +519,12 @@ add_row (GtkWidget *table, int row, const char *label_text, GtkWidget *entry)
label = gtk_label_new_with_mnemonic (label_text);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 1.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 0.5);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
+#endif
gtk_table_attach (GTK_TABLE (table), label,
0, 1, row, row + 1,
@@ -668,7 +673,12 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 0);
image = get_image (dialog);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (image, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
+#endif
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
#if GTK_CHECK_VERSION (3, 0, 0)
@@ -683,7 +693,12 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
s = g_strdup_printf ("<big><b>%s</b></big>", dialog->priv->message);
gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
+#if GTK_CHECK_VERSION (3, 0, 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);
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_label_set_max_width_chars (GTK_LABEL (label), 50);
@@ -713,7 +728,12 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
"Authentication as the super user is required to perform this action."));
}
}
+#if GTK_CHECK_VERSION (3, 0, 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);
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_label_set_max_width_chars (GTK_LABEL (label), 50);
@@ -806,7 +826,12 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
s = g_strdup_printf ("<small>%s</small>", value);
gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 1.0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 1.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 1.0);
+#endif
s = g_strdup_printf ("<small><b>%s:</b></small>", key);
add_row (table, rows, s, label);
g_free (s);
@@ -825,7 +850,12 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
dialog->priv->action_id);
gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 1.0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 1.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 1.0);
+#endif
add_row (table, rows++, _("<small><b>Action:</b></small>"), label);
g_signal_connect (label, "activate-link", G_CALLBACK (action_id_activated), NULL);
@@ -842,7 +872,12 @@ polkit_mate_authentication_dialog_constructed (GObject *object)
dialog->priv->vendor);
gtk_label_set_markup (GTK_LABEL (label), s);
g_free (s);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 1.0);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+ gtk_label_set_yalign (GTK_LABEL (label), 1.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 1.0);
+#endif
add_row (table, rows++, _("<small><b>Vendor:</b></small>"), label);
s = g_strdup_printf (_("Click to open %s"), dialog->priv->vendor_url);