diff options
author | monsta <[email protected]> | 2018-01-28 21:15:38 +0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-01-30 11:56:38 +0100 |
commit | 0cce876dac2617c9cb7145ad6815c80b2040403e (patch) | |
tree | 666c114e778502870bc5831dc19ea3aa2135e8e2 /src | |
parent | f09cf54ef735e19c153ca44c5d13b06c5dddd2f1 (diff) | |
download | eom-0cce876dac2617c9cb7145ad6815c80b2040403e.tar.bz2 eom-0cce876dac2617c9cb7145ad6815c80b2040403e.tar.xz |
require GTK+ 3.22 and GLib 2.50
and drop additional checks for min/max GLib versions, it's not needed
Diffstat (limited to 'src')
-rw-r--r-- | src/eom-close-confirmation-dialog.c | 20 | ||||
-rw-r--r-- | src/eom-error-message-area.c | 8 | ||||
-rw-r--r-- | src/eom-print-image-setup.c | 12 | ||||
-rw-r--r-- | src/eom-scroll-view.c | 15 | ||||
-rw-r--r-- | src/eom-thumb-view.c | 9 | ||||
-rw-r--r-- | src/eom-util.c | 4 | ||||
-rw-r--r-- | src/eom-window.c | 28 | ||||
-rw-r--r-- | src/main.c | 4 |
8 files changed, 0 insertions, 100 deletions
diff --git a/src/eom-close-confirmation-dialog.c b/src/eom-close-confirmation-dialog.c index f7eb91c..89069ce 100644 --- a/src/eom-close-confirmation-dialog.c +++ b/src/eom-close-confirmation-dialog.c @@ -401,11 +401,7 @@ build_single_img_dialog (EomCloseConfirmationDialog *dlg) gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE); gtk_label_set_max_width_chars (GTK_LABEL (primary_label), 88); -#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 gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE); image_name = eom_image_get_caption (img); @@ -424,11 +420,7 @@ 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, 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 gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); @@ -605,11 +597,7 @@ build_multiple_imgs_dialog (EomCloseConfirmationDialog *dlg) gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE); gtk_label_set_max_width_chars (GTK_LABEL (primary_label), 88); -#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 gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE); str = g_strdup_printf ( @@ -634,11 +622,7 @@ 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, 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 scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow, TRUE, TRUE, 0); @@ -658,11 +642,7 @@ 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, 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 gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE); gtk_label_set_mnemonic_widget (GTK_LABEL (select_label), treeview); diff --git a/src/eom-error-message-area.c b/src/eom-error-message-area.c index 39a1f36..c8fdafd 100644 --- a/src/eom-error-message-area.c +++ b/src/eom-error-message-area.c @@ -70,11 +70,7 @@ 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, 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 gtk_widget_set_can_focus (primary_label, TRUE); @@ -95,11 +91,7 @@ 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, 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 } gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (message_area))), hbox_content, TRUE, TRUE, 0); diff --git a/src/eom-print-image-setup.c b/src/eom-print-image-setup.c index 0e7b43d..b396750 100644 --- a/src/eom-print-image-setup.c +++ b/src/eom-print-image-setup.c @@ -669,11 +669,7 @@ grid_attach_spin_button_with_label (GtkWidget *grid, GtkWidget *label, *spin_button; label = gtk_label_new_with_mnemonic (text_label); -#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 spin_button = gtk_spin_button_new_with_range (0, 100, 0.01); gtk_spin_button_set_digits (GTK_SPIN_BUTTON (spin_button), 2); gtk_entry_set_width_chars (GTK_ENTRY (spin_button), 6); @@ -877,11 +873,7 @@ eom_print_image_setup_init (EomPrintImageSetup *setup) 2, 1); label = gtk_label_new_with_mnemonic (_("C_enter:")); -#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 combobox = gtk_combo_box_text_new (); gtk_combo_box_text_insert_text (GTK_COMBO_BOX_TEXT (combobox), @@ -927,11 +919,7 @@ eom_print_image_setup_init (EomPrintImageSetup *setup) priv->scaling = hscale; label = gtk_label_new_with_mnemonic (_("_Unit:")); -#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 combobox = gtk_combo_box_text_new (); gtk_combo_box_text_insert_text (GTK_COMBO_BOX_TEXT (combobox), UNIT_MM, diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index 6f84286..c31a874 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -913,21 +913,12 @@ display_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer data) } if (do_zoom) { -#if GTK_CHECK_VERSION (3, 20, 0) GdkSeat *seat; -#else - GdkDeviceManager *device_manager; -#endif GdkDevice *device; gint x, y; -#if GTK_CHECK_VERSION (3, 20, 0) seat = gdk_display_get_default_seat (gtk_widget_get_display (widget)); device = gdk_seat_get_pointer (seat); -#else - device_manager = gdk_display_get_device_manager (gtk_widget_get_display (widget)); - device = gdk_device_manager_get_client_pointer (device_manager); -#endif gdk_window_get_device_position (gtk_widget_get_window (widget), device, &x, &y, NULL); @@ -2155,14 +2146,8 @@ view_on_button_press_event_cb (GtkWidget *widget, GdkEventButton *event, /* Ignore double-clicks and triple-clicks */ if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { -#if GTK_CHECK_VERSION (3, 22, 0) gtk_menu_popup_at_pointer (GTK_MENU (view->priv->menu), (const GdkEvent*) event); -#else - gtk_menu_popup (GTK_MENU (view->priv->menu), - NULL, NULL, NULL, NULL, - event->button, event->time); -#endif return TRUE; } diff --git a/src/eom-thumb-view.c b/src/eom-thumb-view.c index f1d5e36..03270cc 100644 --- a/src/eom-thumb-view.c +++ b/src/eom-thumb-view.c @@ -113,9 +113,6 @@ eom_thumb_view_constructed (GObject *object) FALSE); g_object_set (thumbview->priv->pixbuf_cell, -#if !GTK_CHECK_VERSION (3, 16, 0) - "follow-state", FALSE, -#endif "height", 100, "width", 115, "yalign", 0.5, @@ -1066,12 +1063,6 @@ eom_thumb_view_popup_menu (EomThumbView *thumbview, GdkEventButton *event) { g_return_if_fail (event != NULL); -#if GTK_CHECK_VERSION (3, 22, 0) gtk_menu_popup_at_pointer (GTK_MENU (thumbview->priv->menu), (const GdkEvent*) event); -#else - gtk_menu_popup (GTK_MENU (thumbview->priv->menu), - NULL, NULL, NULL, NULL, - event->button, event->time); -#endif } diff --git a/src/eom-util.c b/src/eom-util.c index a20ea34..5fd2335 100644 --- a/src/eom-util.c +++ b/src/eom-util.c @@ -53,11 +53,7 @@ eom_util_show_help (const gchar *section, GtkWindow *parent) if (section) uri = g_strdup_printf ("help:eom/%s", section); -#if GTK_CHECK_VERSION (3, 22, 0) gtk_show_uri_on_window (parent, ((uri != NULL) ? uri : "help:eom"), -#else - gtk_show_uri (NULL, ((uri != NULL) ? uri : "help:eom"), -#endif gtk_get_current_event_time (), &error); g_free (uri); diff --git a/src/eom-window.c b/src/eom-window.c index 77f36c2..593a894 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -828,11 +828,7 @@ image_file_changed_cb (EomImage *img, EomWindow *window) gtk_widget_set_halign (image, GTK_ALIGN_START); gtk_widget_set_valign (image, GTK_ALIGN_END); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); -#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); gtk_widget_show (info_bar); @@ -1168,9 +1164,7 @@ eom_window_obtain_desired_size (EomImage *image, EomWindow *window) { GdkScreen *screen; -#if GTK_CHECK_VERSION (3, 22, 0) GdkDisplay *display; -#endif GdkRectangle monitor; GtkAllocation allocation; gint final_width, final_height; @@ -1202,19 +1196,11 @@ eom_window_obtain_desired_size (EomImage *image, window_height = allocation.height; screen = gtk_window_get_screen (GTK_WINDOW (window)); -#if GTK_CHECK_VERSION (3, 22, 0) display = gdk_screen_get_display (screen); gdk_monitor_get_geometry (gdk_display_get_monitor_at_window (display, gtk_widget_get_window (GTK_WIDGET (window))), &monitor); -#else - - gdk_screen_get_monitor_geometry (screen, - gdk_screen_get_monitor_at_window (screen, - gtk_widget_get_window (GTK_WIDGET (window))), - &monitor); -#endif screen_width = monitor.width; screen_height = monitor.height; @@ -1654,28 +1640,18 @@ eom_window_update_fullscreen_popup (EomWindow *window) GtkWidget *popup = window->priv->fullscreen_popup; GdkRectangle screen_rect; GdkScreen *screen; -#if GTK_CHECK_VERSION (3, 22, 0) GdkDisplay *display; -#endif g_return_if_fail (popup != NULL); if (gtk_widget_get_window (GTK_WIDGET (window)) == NULL) return; screen = gtk_widget_get_screen (GTK_WIDGET (window)); -#if GTK_CHECK_VERSION (3, 22, 0) display = gdk_screen_get_display (screen); gdk_monitor_get_geometry (gdk_display_get_monitor_at_window (display, gtk_widget_get_window (GTK_WIDGET (window))), &screen_rect); -#else - gdk_screen_get_monitor_geometry (screen, - gdk_screen_get_monitor_at_window - (screen, - gtk_widget_get_window (GTK_WIDGET (window))), - &screen_rect); -#endif gtk_widget_set_size_request (popup, screen_rect.width, @@ -2725,11 +2701,7 @@ eom_window_set_wallpaper (EomWindow *window, const gchar *filename, const gchar gtk_widget_set_halign (image, GTK_ALIGN_START); gtk_widget_set_valign (image, GTK_ALIGN_END); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); -#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); gtk_widget_show (info_bar); @@ -49,11 +49,7 @@ #include <exempi/xmp.h> #endif -#if GTK_CHECK_VERSION (3, 20, 0) #define EOM_CSS_FILE_PATH EOM_DATA_DIR G_DIR_SEPARATOR_S "eom.css" -#else -#define EOM_CSS_FILE_PATH EOM_DATA_DIR G_DIR_SEPARATOR_S "eom-3.18.css" -#endif static EomStartupFlags flags; |