summaryrefslogtreecommitdiff
path: root/src/eom-window.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2015-09-02 15:56:41 +0200
committerinfirit <[email protected]>2015-09-06 13:08:32 +0200
commit4a7304dcb64cd908a2e4e9c907efd5ad40d82a48 (patch)
tree690ce2246b1e495847f3abdb64ac9b6f198ffceb /src/eom-window.c
parenta3362f16408b7d4e36c917e384dd346cc8cc40c4 (diff)
downloadeom-4a7304dcb64cd908a2e4e9c907efd5ad40d82a48.tar.bz2
eom-4a7304dcb64cd908a2e4e9c907efd5ad40d82a48.tar.xz
Gtk3: Drop GtkMisc and GtkAlignment usage
Both are deprecated and can be replaced by simple GtkWidget properties. This leaves out the dialogs made with Glade as it doesn't have support for the new margin-start property yet. taken from: https://git.gnome.org/browse/eog/commit/?id=2fad221
Diffstat (limited to 'src/eom-window.c')
-rw-r--r--src/eom-window.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index fd9c3ac..db0240e 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -829,9 +829,15 @@ image_file_changed_cb (EomImage *img, EomWindow *window)
hbox = gtk_hbox_new (FALSE, 8);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_valign (image, GTK_ALIGN_START);
+ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+#endif
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar))), hbox, TRUE, TRUE, 0);
gtk_widget_show_all (hbox);
gtk_widget_show (info_bar);
@@ -2737,9 +2743,15 @@ eom_window_set_wallpaper (EomWindow *window, const gchar *filename, const gchar
hbox = gtk_hbox_new (FALSE, 8);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_valign (image, GTK_ALIGN_START);
+ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+#endif
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar))), hbox, TRUE, TRUE, 0);
gtk_widget_show_all (hbox);
gtk_widget_show (info_bar);