summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2012-04-07 12:56:02 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2012-04-07 12:56:02 +0000
commitc48042e0da0d3ced1abf7311aff1adb0c2a58834 (patch)
tree404494593906e44818336b135b89ec5c997bce93 /gtk
parent97af7afedf70d630e1f140f1ac3431b44a78456c (diff)
downloadnetsurf-c48042e0da0d3ced1abf7311aff1adb0c2a58834.tar.gz
netsurf-c48042e0da0d3ced1abf7311aff1adb0c2a58834.tar.bz2
Implement gui_launch_url() for GTK.
svn path=/trunk/netsurf/; revision=13820
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gui.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gui.c b/gtk/gui.c
index b403297bf..200135cf5 100644
--- a/gtk/gui.c
+++ b/gtk/gui.c
@@ -659,6 +659,17 @@ void gui_window_save_link(struct gui_window *g, const char *url,
void gui_launch_url(const char *url)
{
+ gboolean ok;
+ GError *error = NULL;
+
+ ok = gtk_show_uri(NULL, url, GDK_CURRENT_TIME, &error);
+ if (ok == TRUE)
+ return;
+
+ if (error) {
+ warn_user(messages_get("URIOpenError"), error->message);
+ g_error_free(error);
+ }
}
void warn_user(const char *warning, const char *detail)