235 lines
8.0 KiB
Diff
235 lines
8.0 KiB
Diff
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -85,9 +85,9 @@ YELP_HELP_INIT
|
|
# MATE Libs
|
|
# **********
|
|
|
|
-GLIB_REQUIRED=2.50.0
|
|
-GIO_REQUIRED=2.50.0
|
|
-GTK_REQUIRED=3.22.0
|
|
+GLIB_REQUIRED=2.48.0
|
|
+GIO_REQUIRED=2.48.0
|
|
+GTK_REQUIRED=3.20.0
|
|
MATE_DESKTOP_REQUIRED=1.17.0
|
|
GDKPIXBUF_REQUIRED=2.30.0
|
|
SHARED_MIME_INFO_REQUIRED=0.20
|
|
--- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
|
|
+++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
|
|
@@ -358,7 +358,12 @@ popup_context_menu_cb (GtkWidget
|
|
menu = GTK_MENU (gtk_ui_manager_get_widget (etoolbar->priv->manager,
|
|
etoolbar->priv->popup_path));
|
|
g_return_if_fail (menu != NULL);
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
gtk_menu_popup_at_pointer (menu, NULL);
|
|
+#else
|
|
+ gtk_menu_popup (menu, NULL, NULL,
|
|
+ NULL, NULL, button_number, GDK_CURRENT_TIME);
|
|
+#endif
|
|
g_signal_connect_object (menu, "selection-done",
|
|
G_CALLBACK (popup_context_deactivate),
|
|
etoolbar, 0);
|
|
@@ -380,7 +385,12 @@ button_press_event_cb (GtkWidget *widget
|
|
menu = GTK_MENU (gtk_ui_manager_get_widget (etoolbar->priv->manager,
|
|
etoolbar->priv->popup_path));
|
|
g_return_val_if_fail (menu != NULL, FALSE);
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
gtk_menu_popup_at_pointer (menu, (const GdkEvent*) event);
|
|
+#else
|
|
+ gtk_menu_popup (menu, NULL, NULL,
|
|
+ NULL, NULL, event->button, event->time);
|
|
+#endif
|
|
g_signal_connect_object (menu, "selection-done",
|
|
G_CALLBACK (popup_context_deactivate),
|
|
etoolbar, 0);
|
|
--- a/data/eom-image-properties-dialog.ui
|
|
+++ b/data/eom-image-properties-dialog.ui
|
|
@@ -1,7 +1,7 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- Generated with glade 3.22.1 -->
|
|
<interface>
|
|
- <requires lib="gtk+" version="3.22"/>
|
|
+ <requires lib="gtk+" version="3.20"/>
|
|
<template class="EomPropertiesDialog" parent="GtkDialog">
|
|
<property name="can_focus">False</property>
|
|
<property name="border_width">5</property>
|
|
--- a/src/eom-properties-dialog.c
|
|
+++ b/src/eom-properties-dialog.c
|
|
@@ -453,7 +453,12 @@ pd_folder_button_clicked_cb (GtkButton *
|
|
timestamp = gtk_get_current_event_time ();
|
|
|
|
window = GTK_WINDOW (data);
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
gtk_show_uri_on_window (window, priv->folder_button_uri, timestamp, NULL);
|
|
+#else
|
|
+ gtk_show_uri (gtk_window_get_screen (window), priv->folder_button_uri,
|
|
+ timestamp, NULL);
|
|
+#endif
|
|
}
|
|
|
|
static gboolean
|
|
--- a/src/eom-scroll-view.c
|
|
+++ b/src/eom-scroll-view.c
|
|
@@ -2241,8 +2241,14 @@ view_on_button_press_event_cb (GtkWidget
|
|
/* 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;
|
|
}
|
|
--- a/src/eom-sidebar.c
|
|
+++ b/src/eom-sidebar.c
|
|
@@ -218,6 +218,32 @@ eom_sidebar_class_init (EomSidebarClass
|
|
GTK_TYPE_WIDGET);
|
|
}
|
|
|
|
+#if !GTK_CHECK_VERSION (3, 22, 0)
|
|
+static void
|
|
+eom_sidebar_menu_position_under_widget (GtkMenu *menu,
|
|
+ int *x,
|
|
+ int *y,
|
|
+ gboolean *push_in,
|
|
+ gpointer user_data)
|
|
+{
|
|
+ GtkWidget *widget;
|
|
+ GtkAllocation allocation;
|
|
+
|
|
+ g_return_if_fail (GTK_IS_WIDGET (user_data));
|
|
+ g_return_if_fail (!gtk_widget_get_has_window (GTK_WIDGET (user_data)));
|
|
+
|
|
+ widget = GTK_WIDGET (user_data);
|
|
+
|
|
+ gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
|
|
+ gtk_widget_get_allocation (widget, &allocation);
|
|
+
|
|
+ *x += allocation.x;
|
|
+ *y += allocation.y + allocation.height;
|
|
+
|
|
+ *push_in = FALSE;
|
|
+}
|
|
+#endif
|
|
+
|
|
static gboolean
|
|
eom_sidebar_select_button_press_cb (GtkWidget *widget,
|
|
GdkEventButton *event,
|
|
@@ -241,11 +267,17 @@ eom_sidebar_select_button_press_cb (GtkW
|
|
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
|
|
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
gtk_menu_popup_at_widget (GTK_MENU (eom_sidebar->priv->menu),
|
|
widget,
|
|
GDK_GRAVITY_SOUTH_WEST,
|
|
GDK_GRAVITY_NORTH_WEST,
|
|
(const GdkEvent*) event);
|
|
+#else
|
|
+ gtk_menu_popup (GTK_MENU (eom_sidebar->priv->menu), NULL, NULL,
|
|
+ eom_sidebar_menu_position_under_widget, widget,
|
|
+ event->button, event->time);
|
|
+#endif
|
|
|
|
return TRUE;
|
|
}
|
|
@@ -266,11 +298,17 @@ eom_sidebar_select_button_key_press_cb (
|
|
event->keyval == GDK_KEY_KP_Enter) {
|
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
|
|
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
gtk_menu_popup_at_widget (GTK_MENU (eom_sidebar->priv->menu),
|
|
widget,
|
|
GDK_GRAVITY_SOUTH_WEST,
|
|
GDK_GRAVITY_NORTH_WEST,
|
|
(const GdkEvent*) event);
|
|
+#else
|
|
+ gtk_menu_popup (GTK_MENU (eom_sidebar->priv->menu), NULL, NULL,
|
|
+ eom_sidebar_menu_position_under_widget, widget,
|
|
+ GDK_BUTTON_PRIMARY, event->time);
|
|
+#endif
|
|
|
|
return TRUE;
|
|
}
|
|
--- a/src/eom-thumb-view.c
|
|
+++ b/src/eom-thumb-view.c
|
|
@@ -1062,6 +1062,11 @@ eom_thumb_view_popup_menu (EomThumbView
|
|
{
|
|
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
|
|
}
|
|
--- a/src/eom-util.c
|
|
+++ b/src/eom-util.c
|
|
@@ -53,7 +53,11 @@ eom_util_show_help (const gchar *section
|
|
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);
|
|
@@ -362,7 +366,12 @@ _eom_util_show_file_in_filemanager_fallb
|
|
g_object_unref (parent_file);
|
|
}
|
|
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
if (uri && !gtk_show_uri_on_window (toplevel, uri, timestamp, &error)) {
|
|
+#else
|
|
+ if (uri && !gtk_show_uri (gtk_window_get_screen (toplevel), uri,
|
|
+ timestamp, &error)) {
|
|
+#endif
|
|
g_warning ("Couldn't show containing folder \"%s\": %s", uri,
|
|
error->message);
|
|
g_error_free (error);
|
|
--- a/src/eom-window.c
|
|
+++ b/src/eom-window.c
|
|
@@ -1200,9 +1200,16 @@ eom_window_obtain_desired_size (EomImage
|
|
screen = gtk_window_get_screen (GTK_WINDOW (window));
|
|
display = gdk_screen_get_display (screen);
|
|
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
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;
|
|
@@ -1651,9 +1658,16 @@ eom_window_update_fullscreen_popup (EomW
|
|
screen = gtk_widget_get_screen (GTK_WIDGET (window));
|
|
display = gdk_screen_get_display (screen);
|
|
|
|
+#if GTK_CHECK_VERSION (3, 22, 0)
|
|
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,
|