File mate-terminal-gtk-3.20.patch of Package mate-terminal

--- a/configure.ac
+++ b/configure.ac
@@ -38,10 +38,10 @@ MATE_COMPILE_WARNINGS([maximum])
 
 AM_GLIB_GNU_GETTEXT
 
-GLIB_REQUIRED=2.50.0
-GIO_REQUIRED=2.50.0
-GTK_REQUIRED=3.22.0
-VTE_REQUIRED=0.46
+GLIB_REQUIRED=2.48.0
+GIO_REQUIRED=2.48.0
+GTK_REQUIRED=3.20.0
+VTE_REQUIRED=0.44
 DCONF_REQUIRED=0.13.4
 
 PKG_CHECK_MODULES([TERM],
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -139,7 +139,12 @@ terminal_util_show_help (const char *top
 		url = g_strdup ("help:mate-terminal");
 	}
 
+#if GTK_CHECK_VERSION (3, 22, 0)
 	if (!gtk_show_uri_on_window (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error))
+#else
+	if (!gtk_show_uri (gtk_window_get_screen (GTK_WINDOW( parent)), url,
+	                   gtk_get_current_event_time (), &error))
+#endif
 	{
 		terminal_util_show_error_dialog (GTK_WINDOW (parent), NULL, error,
 		                                 _("There was an error displaying help"));
@@ -211,7 +215,12 @@ terminal_util_open_url (GtkWidget *paren
 		g_assert_not_reached ();
 	}
 
+#if GTK_CHECK_VERSION (3, 22, 0)
 	if (!gtk_show_uri_on_window (GTK_WINDOW (parent), uri, user_time, &error))
+#else
+	if (!gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (parent)), uri,
+	                   user_time, &error))
+#endif
 	{
 		terminal_util_show_error_dialog (GTK_WINDOW (parent), NULL, error,
 		                                 _("Could not open the address ā€œ%sā€"),
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -577,7 +577,12 @@ position_menu_under_widget (GtkMenu *men
     GtkRequisition req;
     GtkRequisition menu_req;
     GdkRectangle monitor;
+#if GTK_CHECK_VERSION (3, 22, 0)
     GdkMonitor *monitor_num;
+#else
+    int monitor_num;
+    GdkScreen *screen;
+#endif
     GdkDisplay *display;
     GtkAllocation widget_allocation;
 
@@ -589,10 +594,17 @@ position_menu_under_widget (GtkMenu *men
     gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
 
     display = gtk_widget_get_display (GTK_WIDGET (menu));
+#if GTK_CHECK_VERSION (3, 22, 0)
     monitor_num = gdk_display_get_monitor_at_window (display, widget_window);
     if (monitor_num == NULL)
         monitor_num = gdk_display_get_monitor (display, 0);
     gdk_monitor_get_geometry (monitor_num, &monitor);
+#else
+    screen = gdk_display_get_default_screen (display);
+    monitor_num = gdk_screen_get_monitor_at_window (screen, widget_window);
+    monitor_num = monitor_num > 0 ? monitor_num : 0;
+    gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+#endif
 
     gdk_window_get_origin (widget_window, x, y);
     if (!gtk_widget_get_has_window (widget))
@@ -1202,7 +1214,11 @@ terminal_window_update_search_sensitivit
     if (screen != priv->active_screen)
         return;
 
+#if VTE_CHECK_VERSION (0, 46, 0)
     can_search = vte_terminal_search_get_regex (VTE_TERMINAL (screen)) != NULL;
+#else
+    can_search = vte_terminal_search_get_gregex (VTE_TERMINAL (screen)) != NULL;
+#endif
 
     action = gtk_action_group_get_action (priv->action_group, "SearchFindNext");
     gtk_action_set_sensitive (action, can_search);
openSUSE Build Service is sponsored by