summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-10-25 13:22:09 +0200
committerinfirit <[email protected]>2014-10-25 14:05:43 +0200
commit85a2fb10b791b76d49568473cd181d5fe98dcbed (patch)
treee4793701309d22e2d6f4a2670cc031e505456ada
parentbc8eb8bd2f943b69c87eb7c9e154928f1dd861bb (diff)
downloadmarco-85a2fb10b791b76d49568473cd181d5fe98dcbed.tar.bz2
marco-85a2fb10b791b76d49568473cd181d5fe98dcbed.tar.xz
theme-viewer: stop using gtk_misc_set_alignment for Gtk+3
Based on metacity commit: 99bfe2d27c6babeeea3539b990505895750d3541 From: Alberts Muktupāvels <[email protected]>
-rw-r--r--src/ui/theme-viewer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c
index 95858d2e..cecfcb05 100644
--- a/src/ui/theme-viewer.c
+++ b/src/ui/theme-viewer.c
@@ -244,7 +244,12 @@ dialog_contents (void)
label = gtk_label_new (_("This is a sample message in a sample dialog"));
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO,
GTK_ICON_SIZE_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_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_selectable (GTK_LABEL (label), TRUE);