summaryrefslogtreecommitdiff
path: root/src/terminal-util.c
diff options
context:
space:
mode:
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ā€"),