summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-29 22:22:48 +0300
committerraveit65 <[email protected]>2018-01-31 09:55:09 +0100
commit45cbbd09a196d3143e25db3fe0ae7103388aae10 (patch)
tree2d8e302296e4b3d292db479f24f92d9f7065788b
parent32575e23107333add227eaa0501ae3cfe6d4fd8a (diff)
downloadatril-45cbbd09a196d3143e25db3fe0ae7103388aae10.tar.bz2
atril-45cbbd09a196d3143e25db3fe0ae7103388aae10.tar.xz
require GTK+ 3.22 and GLib 2.50
-rw-r--r--configure.ac4
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.c2
-rw-r--r--cut-n-paste/zoom-control/ephy-zoom-control.c4
-rw-r--r--libdocument/ev-document-misc.c18
-rw-r--r--libdocument/ev-document-misc.h6
-rw-r--r--libmisc/ev-page-action-widget.c4
-rw-r--r--libview/ev-annotation-window.c9
-rw-r--r--libview/ev-view-presentation.c12
-rw-r--r--libview/ev-view.c22
-rw-r--r--previewer/ev-previewer-window.c9
-rw-r--r--shell/eggfindbar.c4
-rw-r--r--shell/ev-annotation-properties-dialog.c20
-rw-r--r--shell/ev-message-area.c8
-rw-r--r--shell/ev-navigation-action-widget.c16
-rw-r--r--shell/ev-password-view.c8
-rw-r--r--shell/ev-progress-message-area.c4
-rw-r--r--shell/ev-properties-license.c4
-rw-r--r--shell/ev-utils.c13
-rw-r--r--shell/ev-window.c17
19 files changed, 8 insertions, 176 deletions
diff --git a/configure.ac b/configure.ac
index f5cc5915..36217e44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,8 +85,8 @@ GLIB_GSETTINGS
dnl Specify required versions of dependencies
CAIRO_REQUIRED=1.10.0
-GLIB_REQUIRED=2.36.0
-GTK_REQUIRED=3.14.0
+GLIB_REQUIRED=2.50.0
+GTK_REQUIRED=3.22.0
WEBKIT_REQUIRED=2.4.3
LIBSECRET_REQUIRED=0.5
LIBXML_REQUIRED=2.5.0
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
index 580e1c70..f9e3f22f 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
@@ -260,10 +260,8 @@ egg_toolbar_editor_class_init (EggToolbarEditorClass *klass)
G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
G_PARAM_CONSTRUCT));
-#if GTK_CHECK_VERSION (3, 20, 0)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gtk_widget_class_set_css_name (widget_class, "EggToolbarEditor");
-#endif
g_type_class_add_private (object_class, sizeof (EggToolbarEditorPrivate));
}
diff --git a/cut-n-paste/zoom-control/ephy-zoom-control.c b/cut-n-paste/zoom-control/ephy-zoom-control.c
index 27a1e31a..aeee9228 100644
--- a/cut-n-paste/zoom-control/ephy-zoom-control.c
+++ b/cut-n-paste/zoom-control/ephy-zoom-control.c
@@ -193,11 +193,7 @@ ephy_zoom_control_init (EphyZoomControl *control)
(GtkTreeViewRowSeparatorFunc) row_is_separator,
NULL, NULL);
-#if GTK_CHECK_VERSION(3,20,0)
gtk_widget_set_focus_on_click (GTK_WIDGET (p->combo), FALSE);
-#else
- gtk_combo_box_set_focus_on_click (p->combo, FALSE);
-#endif
g_object_ref_sink (G_OBJECT (p->combo));
gtk_widget_show (GTK_WIDGET (p->combo));
diff --git a/libdocument/ev-document-misc.c b/libdocument/ev-document-misc.c
index 88935c73..87364525 100644
--- a/libdocument/ev-document-misc.c
+++ b/libdocument/ev-document-misc.c
@@ -395,11 +395,7 @@ ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf)
}
gdouble
-#if GTK_CHECK_VERSION (3, 22, 0)
ev_document_misc_get_screen_dpi (GdkScreen *screen, GdkMonitor *monitor)
-#else
-ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor)
-#endif
{
gdouble dp, di;
@@ -407,13 +403,8 @@ ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor)
dp = hypot (WidthOfScreen (gdk_x11_screen_get_xscreen (screen)), HeightOfScreen (gdk_x11_screen_get_xscreen (screen)));
/*diagonal in inches*/
-#if GTK_CHECK_VERSION (3, 22, 0)
di = hypot (gdk_monitor_get_width_mm(monitor), gdk_monitor_get_height_mm (monitor)) / 25.4;
di /= gdk_monitor_get_scale_factor (monitor);
-#else
- di = hypot (gdk_screen_get_width_mm(screen), gdk_screen_get_height_mm (screen)) / 25.4;
- di /= gdk_screen_get_monitor_scale_factor(screen, monitor);
-#endif
return (dp / di);
}
@@ -446,11 +437,7 @@ ev_document_misc_get_pointer_position (GtkWidget *widget,
gint *x,
gint *y)
{
-#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
-#else
- GdkDeviceManager *device_manager;
-#endif
GdkDevice *device_pointer;
GdkRectangle allocation;
@@ -462,13 +449,8 @@ ev_document_misc_get_pointer_position (GtkWidget *widget,
if (!gtk_widget_get_realized (widget))
return;
-#if GTK_CHECK_VERSION (3, 20, 0)
seat = gdk_display_get_default_seat (gtk_widget_get_display (widget));
device_pointer = gdk_seat_get_pointer (seat);
-#else
- device_manager = gdk_display_get_device_manager (gtk_widget_get_display (widget));
- device_pointer = gdk_device_manager_get_client_pointer (device_manager);
-#endif
gdk_window_get_device_position (gtk_widget_get_window (widget),
device_pointer,
x, y, NULL);
diff --git a/libdocument/ev-document-misc.h b/libdocument/ev-document-misc.h
index 25e3b8ce..50eb4089 100644
--- a/libdocument/ev-document-misc.h
+++ b/libdocument/ev-document-misc.h
@@ -56,13 +56,9 @@ cairo_surface_t *ev_document_misc_surface_rotate_and_scale (cairo_surface_t *sur
gint dest_height,
gint dest_rotation);
void ev_document_misc_invert_surface (cairo_surface_t *surface);
-void ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf);
+void ev_document_misc_invert_pixbuf (GdkPixbuf *pixbuf);
-#if GTK_CHECK_VERSION (3, 22, 0)
gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen, GdkMonitor *monitor);
-#else
-gdouble ev_document_misc_get_screen_dpi (GdkScreen *screen, gint monitor);
-#endif
gchar *ev_document_misc_format_date (GTime utime);
diff --git a/libmisc/ev-page-action-widget.c b/libmisc/ev-page-action-widget.c
index b12b72c2..fae114d8 100644
--- a/libmisc/ev-page-action-widget.c
+++ b/libmisc/ev-page-action-widget.c
@@ -182,11 +182,7 @@ ev_page_action_widget_init (EvPageActionWidget *action_widget)
action_widget->label = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (action_widget->label), 14);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (action_widget->label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (action_widget->label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (hbox), action_widget->label,
FALSE, FALSE, 0);
gtk_widget_show (action_widget->label);
diff --git a/libview/ev-annotation-window.c b/libview/ev-annotation-window.c
index e3c3783a..86ec6488 100644
--- a/libview/ev-annotation-window.c
+++ b/libview/ev-annotation-window.c
@@ -97,20 +97,13 @@ static gdouble
get_screen_dpi (EvAnnotationWindow *window)
{
GdkScreen *screen;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
GdkDisplay *display;
-#else
- gint monitor;
-#endif
screen = gtk_window_get_screen (GTK_WINDOW (window));
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
monitor = gdk_display_get_primary_monitor (display);
-#else
- monitor = gdk_screen_get_primary_monitor (screen);
-#endif
+
return ev_document_misc_get_screen_dpi (screen, monitor);
}
diff --git a/libview/ev-view-presentation.c b/libview/ev-view-presentation.c
index f52dff8b..72df922d 100644
--- a/libview/ev-view-presentation.c
+++ b/libview/ev-view-presentation.c
@@ -1210,23 +1210,13 @@ static gboolean
init_presentation (GtkWidget *widget)
{
EvViewPresentation *pview = EV_VIEW_PRESENTATION (widget);
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display = gtk_widget_get_display (widget);
GdkRectangle monitor;
GdkMonitor *monitor_num;
-#else
- GdkScreen *screen = gtk_widget_get_screen (widget);
- GdkRectangle monitor;
- gint monitor_num;
-#endif
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor_num = gdk_display_get_monitor_at_window (display, gtk_widget_get_window (widget));
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
+
pview->monitor_width = monitor.width;
pview->monitor_height = monitor.height;
diff --git a/libview/ev-view.c b/libview/ev-view.c
index befef632..545942e3 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -497,24 +497,16 @@ is_dual_page (EvView *view,
switch (view->page_layout) {
case EV_PAGE_LAYOUT_AUTOMATIC: {
GdkScreen *screen;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
GdkDisplay *display;
-#else
- gint monitor;
-#endif
double scale;
double doc_width;
double doc_height;
GtkAllocation allocation;
screen = gtk_widget_get_screen (GTK_WIDGET (view));
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
monitor = gdk_display_get_primary_monitor (display);
-#else
- monitor = gdk_screen_get_primary_monitor (screen);
-#endif
scale = ev_document_misc_get_screen_dpi (screen, monitor) / 72.0;
ev_document_get_max_page_size (view->document, &doc_width, &doc_height);
@@ -693,10 +685,6 @@ view_set_adjustment_values (EvView *view,
gtk_adjustment_set_value (adjustment, (int)new_value);
break;
}
-
-#if !GTK_CHECK_VERSION (3,18,0)
- gtk_adjustment_changed (adjustment);
-#endif
}
static void
@@ -6306,9 +6294,7 @@ ev_view_class_init (EvViewClass *class)
object_class->dispose = ev_view_dispose;
-#if GTK_CHECK_VERSION (3, 20, 0)
gtk_widget_class_set_css_name (widget_class, "evview");
-#endif
container_class->remove = ev_view_remove;
container_class->forall = ev_view_forall;
@@ -7142,12 +7128,8 @@ zoom_for_size_automatic (GdkScreen *screen,
int target_width,
int target_height)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
GdkDisplay *display;
-#else
- gint monitor;
-#endif
double fit_width_scale;
double scale;
@@ -7161,12 +7143,8 @@ zoom_for_size_automatic (GdkScreen *screen,
} else {
double actual_scale;
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
monitor = gdk_display_get_primary_monitor (display);
-#else
- monitor = gdk_screen_get_primary_monitor (screen);
-#endif
actual_scale = ev_document_misc_get_screen_dpi (screen, monitor) / 72.0;
scale = MIN (fit_width_scale, actual_scale);
}
diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c
index 9200dd5e..8d9852f2 100644
--- a/previewer/ev-previewer-window.c
+++ b/previewer/ev-previewer-window.c
@@ -71,20 +71,13 @@ static gdouble
get_screen_dpi (EvPreviewerWindow *window)
{
GdkScreen *screen;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
GdkDisplay *display;
-#else
- gint monitor;
-#endif
screen = gtk_window_get_screen (GTK_WINDOW (window));
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
monitor = gdk_display_get_primary_monitor (display);
-#else
- monitor = gdk_screen_get_primary_monitor (screen);
-#endif
+
return ev_document_misc_get_screen_dpi (screen, monitor);
}
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
index ce0cf8ad..94a2b8d9 100644
--- a/shell/eggfindbar.c
+++ b/shell/eggfindbar.c
@@ -354,11 +354,7 @@ egg_find_bar_init (EggFindBar *find_bar)
priv->status_label = gtk_label_new (NULL);
gtk_label_set_ellipsize (GTK_LABEL (priv->status_label),
PANGO_ELLIPSIZE_END);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (priv->status_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (priv->status_label), 0.0, 0.5);
-#endif
g_signal_connect (priv->find_entry, "changed",
G_CALLBACK (entry_changed_callback),
diff --git a/shell/ev-annotation-properties-dialog.c b/shell/ev-annotation-properties-dialog.c
index a2815030..dc51feea 100644
--- a/shell/ev-annotation-properties-dialog.c
+++ b/shell/ev-annotation-properties-dialog.c
@@ -94,11 +94,7 @@ ev_annotation_properties_dialog_constructed (GObject *object)
switch (dialog->annot_type) {
case EV_ANNOTATION_TYPE_TEXT:
label = gtk_label_new (_("Icon:"));
-#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_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 1);
gtk_widget_show (label);
@@ -158,11 +154,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (grid);
label = gtk_label_new (_("Author:"));
-#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_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
gtk_widget_show (label);
@@ -173,11 +165,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (annot_dialog->author);
label = gtk_label_new (_("Color:"));
-#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_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
gtk_widget_show (label);
@@ -187,11 +175,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (annot_dialog->color);
label = gtk_label_new (_("Style:"));
-#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_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
gtk_widget_show (label);
@@ -222,11 +206,7 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (hbox);
label = gtk_label_new (_("Initial window state:"));
-#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_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1);
gtk_widget_show (label);
diff --git a/shell/ev-message-area.c b/shell/ev-message-area.c
index ba0e86f8..2824ada5 100644
--- a/shell/ev-message-area.c
+++ b/shell/ev-message-area.c
@@ -105,11 +105,7 @@ ev_message_area_init (EvMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_selectable (GTK_LABEL (area->priv->label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (area->priv->label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0.0, 0.5);
-#endif
gtk_widget_set_can_focus (area->priv->label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), area->priv->label, TRUE, TRUE, 0);
gtk_widget_show (area->priv->label);
@@ -118,11 +114,7 @@ ev_message_area_init (EvMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (area->priv->secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (area->priv->secondary_label), TRUE);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (area->priv->secondary_label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (area->priv->secondary_label), 0.0, 0.5);
-#endif
gtk_widget_set_can_focus (area->priv->secondary_label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), area->priv->secondary_label, TRUE, TRUE, 0);
diff --git a/shell/ev-navigation-action-widget.c b/shell/ev-navigation-action-widget.c
index 97bd0da5..d618e9a0 100644
--- a/shell/ev-navigation-action-widget.c
+++ b/shell/ev-navigation-action-widget.c
@@ -131,34 +131,18 @@ menu_position_func (GtkMenu *menu,
GtkTextDirection direction;
GdkWindow *gdk_window;
GdkRectangle monitor;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor_num;
GdkDisplay *display;
-#else
- gint monitor_num;
- GdkScreen *screen;
-#endif
gtk_widget_get_preferred_size (GTK_WIDGET (button->menu), &menu_req, NULL);
direction = gtk_widget_get_direction (widget);
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gtk_widget_get_display (GTK_WIDGET (menu));
-#else
- screen = gtk_widget_get_screen (GTK_WIDGET (menu));
-#endif
gdk_window = gtk_widget_get_window (widget);
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor_num = gdk_display_get_monitor_at_window (display, gdk_window);
if (monitor_num == NULL)
monitor_num = gdk_display_get_monitor (display, 0);
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_window (screen, gdk_window);
- if (monitor_num < 0)
- monitor_num = 0;
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
gdk_window_get_origin (gdk_window, x, y);
gtk_widget_get_allocation (widget, &allocation);
diff --git a/shell/ev-password-view.c b/shell/ev-password-view.c
index d0bf4417..eada87a7 100644
--- a/shell/ev-password-view.c
+++ b/shell/ev-password-view.c
@@ -287,11 +287,7 @@ ev_password_view_ask_password (EvPasswordView *password_view)
gtk_widget_show (main_vbox);
label = gtk_label_new (NULL);
-#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_label_set_line_wrap (GTK_LABEL (label), TRUE);
file_name = g_file_get_basename (password_view->priv->uri_file);
text = g_markup_printf_escaped (_("The document ā€œ%sā€ is locked and requires a password before it can be opened."),
@@ -328,11 +324,7 @@ ev_password_view_ask_password (EvPasswordView *password_view)
FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Password:"));
-#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
password_view->priv->password_entry = gtk_entry_new ();
gtk_entry_set_visibility (GTK_ENTRY (password_view->priv->password_entry), FALSE);
diff --git a/shell/ev-progress-message-area.c b/shell/ev-progress-message-area.c
index 4c972e7c..6ac9f245 100644
--- a/shell/ev-progress-message-area.c
+++ b/shell/ev-progress-message-area.c
@@ -91,11 +91,7 @@ ev_progress_message_area_init (EvProgressMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (area->priv->label),
PANGO_ELLIPSIZE_END);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (area->priv->label), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0.0, 0.5);
-#endif
gtk_box_pack_start (GTK_BOX (vbox), area->priv->label, TRUE, TRUE, 0);
gtk_widget_show (area->priv->label);
diff --git a/shell/ev-properties-license.c b/shell/ev-properties-license.c
index f9f11b04..e65b4bd1 100644
--- a/shell/ev-properties-license.c
+++ b/shell/ev-properties-license.c
@@ -109,11 +109,7 @@ ev_properties_license_add_section (EvPropertiesLicense *properties,
gchar *markup;
title = gtk_label_new (NULL);
-#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (title), 0.0);
-#else
- gtk_misc_set_alignment (GTK_MISC (title), 0.0, 0.5);
-#endif
gtk_label_set_use_markup (GTK_LABEL (title), TRUE);
markup = g_strdup_printf ("<b>%s</b>", title_text);
gtk_label_set_markup (GTK_LABEL (title), markup);
diff --git a/shell/ev-utils.c b/shell/ev-utils.c
index d4a8ff76..342f838e 100644
--- a/shell/ev-utils.c
+++ b/shell/ev-utils.c
@@ -26,7 +26,6 @@
#include <string.h>
#include <glib/gi18n.h>
-#if GTK_CHECK_VERSION(3, 22, 0)
static int
_gtk_get_monitor_num (GdkMonitor *monitor)
{
@@ -43,7 +42,6 @@ _gtk_get_monitor_num (GdkMonitor *monitor)
return -1;
}
-#endif
static void
ev_gui_sanitise_popup_position (GtkMenu *menu,
@@ -51,13 +49,8 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
gint *x,
gint *y)
{
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkDisplay *display = gtk_widget_get_display (widget);
GdkMonitor *monitor_num;
-#else
- GdkScreen *screen = gtk_widget_get_screen (widget);
- gint monitor_num;
-#endif
GdkRectangle monitor;
GtkRequisition req;
@@ -65,15 +58,9 @@ ev_gui_sanitise_popup_position (GtkMenu *menu,
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
-#if GTK_CHECK_VERSION (3, 22, 0)
monitor_num = gdk_display_get_monitor_at_point (display, *x, *y);
gtk_menu_set_monitor (menu, _gtk_get_monitor_num (monitor_num));
gdk_monitor_get_geometry (monitor_num, &monitor);
-#else
- monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
- gtk_menu_set_monitor (menu, monitor_num);
- gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-#endif
*x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width));
*y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height));
diff --git a/shell/ev-window.c b/shell/ev-window.c
index e6bee902..112cbadb 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -390,20 +390,13 @@ static gdouble
get_screen_dpi (EvWindow *window)
{
GdkScreen *screen;
-#if GTK_CHECK_VERSION (3, 22, 0)
GdkMonitor *monitor;
GdkDisplay *display;
-#else
- gint monitor;
-#endif
screen = gtk_window_get_screen (GTK_WINDOW (window));
-#if GTK_CHECK_VERSION (3, 22, 0)
display = gdk_screen_get_display (screen);
monitor = gdk_display_get_primary_monitor (display);
-#else
- monitor = gdk_screen_get_primary_monitor (screen);
-#endif
+
return ev_document_misc_get_screen_dpi (screen, monitor);
}
@@ -4924,17 +4917,11 @@ ev_window_cmd_help_contents (GtkAction *action, EvWindow *ev_window)
{
GError *error = NULL;
-#if GTK_CHECK_VERSION (3, 22, 0)
gtk_show_uri_on_window (GTK_WINDOW (ev_window),
EV_HELP,
gtk_get_current_event_time (),
&error);
-#else
- gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (ev_window)),
- EV_HELP,
- gtk_get_current_event_time (),
- &error);
-#endif
+
if (error) {
ev_window_error_message (ev_window, error,
"%s", _("There was an error displaying help"));