Exemplo n.º 1
0
void gui_launch_url(const char *url)
{
	gboolean ok;
	GError *error = NULL;

	ok = nsgtk_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);
	}
}
Exemplo n.º 2
0
Arquivo: gui.c Projeto: mmuman/NetSurf
static nserror gui_launch_url(struct nsurl *url)
{
	gboolean ok;
	GError *error = NULL;

	ok = nsgtk_show_uri(NULL, nsurl_access(url), GDK_CURRENT_TIME, &error);
	if (ok == TRUE) {
		return NSERROR_OK;
	}

	if (error) {
		nsgtk_warning(messages_get("URIOpenError"), error->message);
		g_error_free(error);
	}
	return NSERROR_NO_FETCH_HANDLER;
}