diff options
Diffstat (limited to 'polkitgtkmate')
-rw-r--r-- | polkitgtkmate/example.c | 15 |
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; |