summaryrefslogtreecommitdiff
path: root/polkitgtkmate/example.c
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 /polkitgtkmate/example.c
parent13904e44d00ee57abc3fb77c1d501df536db2a7a (diff)
downloadmate-polkit-d517ddf7ec16e07187ef393e9bc700b25ad7ce3a.tar.bz2
mate-polkit-d517ddf7ec16e07187ef393e9bc700b25ad7ce3a.tar.xz
[GTK+3] fix deprecated usage of GtkMisc
Diffstat (limited to 'polkitgtkmate/example.c')
-rw-r--r--polkitgtkmate/example.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/polkitgtkmate/example.c b/polkitgtkmate/example.c
index 8b2da85..e6786c1 100644
--- a/polkitgtkmate/example.c
+++ b/polkitgtkmate/example.c
@@ -125,19 +125,34 @@ int main(int argc, char* argv[])
s = g_strdup_printf("Showing PolkitLockButton for action id: %s", action_id);
label = gtk_label_new(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);
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
g_free(s);
label = gtk_label_new(NULL);
+#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);
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
system_bus_name_authorized_label = label;
label = gtk_label_new(NULL);
+#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);
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
unix_process_authorized_label = label;