summaryrefslogtreecommitdiff
path: root/src/eom-close-confirmation-dialog.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-close-confirmation-dialog.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-close-confirmation-dialog.c')
-rw-r--r--src/eom-close-confirmation-dialog.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/eom-close-confirmation-dialog.c b/src/eom-close-confirmation-dialog.c
index 119ff44..4608b71 100644
--- a/src/eom-close-confirmation-dialog.c
+++ b/src/eom-close-confirmation-dialog.c
@@ -399,13 +399,21 @@ build_single_img_dialog (EomCloseConfirmationDialog *dlg)
/* Image */
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_valign (image, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
+#endif
/* Primary label */
primary_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
+#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
image_name = eom_image_get_caption (img);
@@ -424,7 +432,11 @@ build_single_img_dialog (EomCloseConfirmationDialog *dlg)
secondary_label = gtk_label_new (str);
g_free (str);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
+#endif
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
hbox = gtk_hbox_new (FALSE, 12);
@@ -591,7 +603,11 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg)
/* Image */
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING,
GTK_ICON_SIZE_DIALOG);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ 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);
vbox = gtk_vbox_new (FALSE, 12);
@@ -601,7 +617,11 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg)
primary_label = gtk_label_new (NULL);
gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE);
gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_halign (primary_label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
+#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
str = g_strdup_printf (
@@ -626,7 +646,11 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox2), select_label, FALSE, FALSE, 0);
gtk_label_set_line_wrap (GTK_LABEL (select_label), TRUE);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_halign (select_label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (select_label), 0.0, 0.5);
+#endif
scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow, TRUE, TRUE, 0);
@@ -645,7 +669,11 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox2), secondary_label, FALSE, FALSE, 0);
gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 14, 0)
+ gtk_widget_set_halign (secondary_label, GTK_ALIGN_START);
+#else
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5);
+#endif
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
gtk_label_set_mnemonic_widget (GTK_LABEL (select_label), treeview);