mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
Implement gui_launch_url() for GTK.
svn path=/trunk/netsurf/; revision=13820
This commit is contained in:
parent
97af7afedf
commit
c48042e0da
11
gtk/gui.c
11
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)
|
||||
|
Loading…
Reference in New Issue
Block a user