diff options
author | Wolfgang Ulbrich <[email protected]> | 2016-01-25 19:50:59 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2016-01-25 19:50:59 +0100 |
commit | 979f370f721aa269cd00df542c9c17940af86782 (patch) | |
tree | b402f8e05c78d042aaa2e89c7c2c4fdb0d57f665 | |
parent | 4e7953d89dbe3e3166dd13a33669f02b2837811b (diff) | |
download | eom-979f370f721aa269cd00df542c9c17940af86782.tar.bz2 eom-979f370f721aa269cd00df542c9c17940af86782.tar.xz |
GTK3: fix previous GtkMisc deprecation commit
-rw-r--r-- | src/eom-close-confirmation-dialog.c | 24 | ||||
-rw-r--r-- | src/eom-error-message-area.c | 14 | ||||
-rw-r--r-- | src/eom-plugin-manager.c | 4 | ||||
-rw-r--r-- | src/eom-print-image-setup.c | 14 | ||||
-rw-r--r-- | src/eom-window.c | 30 |
5 files changed, 46 insertions, 40 deletions
diff --git a/src/eom-close-confirmation-dialog.c b/src/eom-close-confirmation-dialog.c index 4608b71..2251fee 100644 --- a/src/eom-close-confirmation-dialog.c +++ b/src/eom-close-confirmation-dialog.c @@ -399,7 +399,7 @@ 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) +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_valign (image, GTK_ALIGN_START); #else gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); @@ -409,8 +409,8 @@ build_single_img_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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (primary_label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5); #endif @@ -432,8 +432,8 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (secondary_label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5); #endif @@ -603,7 +603,7 @@ 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) +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_valign (image, GTK_ALIGN_START); #else gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); @@ -617,8 +617,8 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (primary_label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5); #endif @@ -646,8 +646,8 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (select_label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (select_label), 0.0, 0.5); #endif @@ -669,8 +669,8 @@ 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); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (secondary_label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5); #endif diff --git a/src/eom-error-message-area.c b/src/eom-error-message-area.c index 552e2bd..51f2ba2 100644 --- a/src/eom-error-message-area.c +++ b/src/eom-error-message-area.c @@ -59,7 +59,7 @@ set_message_area_text_and_icon (GtkInfoBar *message_area, image = gtk_image_new_from_stock (icon_stock_id, GTK_ICON_SIZE_DIALOG); gtk_widget_show (image); gtk_box_pack_start (GTK_BOX (hbox_content), image, FALSE, FALSE, 0); -#if GTK_CHECK_VERSION (3, 14, 0) +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_valign (image, GTK_ALIGN_START); #else gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0); @@ -78,10 +78,10 @@ set_message_area_text_and_icon (GtkInfoBar *message_area, gtk_box_pack_start (GTK_BOX (vbox), primary_label, TRUE, TRUE, 0); gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE); gtk_label_set_line_wrap (GTK_LABEL (primary_label), FALSE); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (primary_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (primary_label), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (primary_label), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5); #endif gtk_widget_set_can_focus (primary_label, TRUE); @@ -103,10 +103,10 @@ set_message_area_text_and_icon (GtkInfoBar *message_area, gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE); gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE); gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (secondary_label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (secondary_label), 0.0); #else - gtk_misc_set_alignment (GTK_MISC (secondary_label), 0, 0.5); + gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5); #endif } diff --git a/src/eom-plugin-manager.c b/src/eom-plugin-manager.c index 6344cec..2394a5f 100644 --- a/src/eom-plugin-manager.c +++ b/src/eom-plugin-manager.c @@ -854,8 +854,8 @@ eom_plugin_manager_init (EomPluginManager *pm) gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif diff --git a/src/eom-print-image-setup.c b/src/eom-print-image-setup.c index c8c0e46..59f075a 100644 --- a/src/eom-print-image-setup.c +++ b/src/eom-print-image-setup.c @@ -656,7 +656,7 @@ wrap_in_frame (const gchar *label, gchar *bold_text; label_widget = gtk_label_new (""); -#if GTK_CHECK_VERSION (3, 14, 0) +#if GTK_CHECK_VERSION (3, 0, 0) gtk_widget_set_halign (label_widget, GTK_ALIGN_START); #else gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5); @@ -703,8 +703,8 @@ table_attach_spin_button_with_label (GtkWidget *table, GtkWidget *label, *spin_button; label = gtk_label_new_with_mnemonic (text_label); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif @@ -937,8 +937,8 @@ eom_print_image_setup_init (EomPrintImageSetup *setup) #endif label = gtk_label_new_with_mnemonic (_("C_enter:")); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif @@ -1024,8 +1024,8 @@ eom_print_image_setup_init (EomPrintImageSetup *setup) priv->scaling = hscale; label = gtk_label_new_with_mnemonic (_("_Unit:")); -#if GTK_CHECK_VERSION (3, 14, 0) - gtk_widget_set_halign (label, GTK_ALIGN_START); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); #else gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); #endif diff --git a/src/eom-window.c b/src/eom-window.c index db0240e..31be7c0 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -829,14 +829,17 @@ 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); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (image, GTK_ALIGN_START); + gtk_widget_set_valign (image, GTK_ALIGN_END); #else - gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0); + gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); +#endif gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.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); @@ -2743,14 +2746,17 @@ 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); +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_set_halign (image, GTK_ALIGN_START); + gtk_widget_set_valign (image, GTK_ALIGN_END); #else - gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0); + gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); +#endif gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); +#if GTK_CHECK_VERSION (3, 16, 0) + gtk_label_set_xalign (GTK_LABEL (label), 0.0); +#else + gtk_misc_set_alignment (GTK_MISC (label), 0.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); |