summaryrefslogtreecommitdiff
path: root/src/terminal-util.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2018-01-28 19:57:20 +0300
committerraveit65 <[email protected]>2018-01-29 21:14:28 +0100
commit2611e01e644e4a44aec8189bfbcd437bbb27051e (patch)
tree9350a0f0c1389dcff697567850539a01e7191756 /src/terminal-util.c
parent2b454bbabcb0dd7c37fe2856c1020ba18e38e038 (diff)
downloadmate-terminal-2611e01e644e4a44aec8189bfbcd437bbb27051e.tar.bz2
mate-terminal-2611e01e644e4a44aec8189bfbcd437bbb27051e.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/terminal-util.c')
-rw-r--r--src/terminal-util.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/terminal-util.c b/src/terminal-util.c
index 71bcf5f..3c7cb3b 100644
--- a/src/terminal-util.c
+++ b/src/terminal-util.c
@@ -123,26 +123,6 @@ terminal_util_show_error_dialog (GtkWindow *transient_parent,
g_free (message);
}
-static gboolean
-open_url (GtkWindow *parent,
- const char *uri,
- guint32 user_time,
- GError **error)
-{
-#if GTK_CHECK_VERSION (3, 22, 0)
- return gtk_show_uri_on_window (parent, uri, user_time, error);
-#else
- GdkScreen *screen;
-
- if (parent)
- screen = gtk_widget_get_screen (GTK_WIDGET (parent));
- else
- screen = gdk_screen_get_default ();
-
- return gtk_show_uri (screen, uri, user_time, error);
-#endif
-}
-
void
terminal_util_show_help (const char *topic,
GtkWindow *parent)
@@ -159,7 +139,7 @@ terminal_util_show_help (const char *topic,
url = g_strdup ("help:mate-terminal");
}
- if (!open_url (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error))
+ if (!gtk_show_uri_on_window (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error))
{
terminal_util_show_error_dialog (GTK_WINDOW (parent), NULL, error,
_("There was an error displaying help"));
@@ -231,7 +211,7 @@ terminal_util_open_url (GtkWidget *parent,
g_assert_not_reached ();
}
- if (!open_url (GTK_WINDOW (parent), uri, user_time, &error))
+ if (!gtk_show_uri_on_window (GTK_WINDOW (parent), uri, user_time, &error))
{
terminal_util_show_error_dialog (GTK_WINDOW (parent), NULL, error,
_("Could not open the address ā€œ%sā€"),