void menu_help_website(void) { #ifndef _WIN32 // Non-windows check // Launch a browser window for the Salasaga website gnome_url_show(_("http://www.salasaga.org"), NULL); #endif }
void gm_open_uri (const gchar *uri) { g_return_if_fail (uri != NULL); if ( !gnome_url_show (uri, NULL)) gm_open_uri_fallback (uri); }
static void help_clicked(void) { GError *error = NULL; gnome_url_show(CELLWRITER_URL, &error); if (error) g_warning("Failed to launch help: %s", error->message); }
NS_IMETHODIMP nsGnomeVFSService::ShowURI(nsIURI *aURI) { nsCAutoString spec; aURI->GetSpec(spec); if (gnome_url_show(spec.get(), NULL)) return NS_OK; return NS_ERROR_FAILURE; }
static void command_open_faq (BonoboUIComponent *uih, EShellWindow *window, const char *path) { GError *error = NULL; gnome_url_show ("http://www.go-evolution.org/FAQ", &error); if (error != NULL) { e_notice (NULL, GTK_MESSAGE_ERROR, _("Error opening the FAQ webpage.")); g_error_free (error); } }
void show_url(const char *url) { if (!url) return; #ifdef _WIN32 ShellExecute((HWND)(GDK_WINDOW_HWND(gpAppFrame->window->window)), "OPEN", url, NULL, NULL, SW_SHOWNORMAL); #elif defined(CONFIG_GNOME) gnome_url_show(url, NULL); #elif defined(CONFIG_GPE) gchar *command = g_strdup_printf("gpe-mini-browser %s", url); system(command); g_free(command); #else spawn_command("firefox", url); #endif }
static void dialog_button_clicked_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset) { switch (response_id) { case GTK_RESPONSE_NONE: case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_OK: case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CLOSE: gtk_main_quit (); break; case GTK_RESPONSE_HELP: gnome_url_show (HELP_URL, NULL); break; default: g_assert_not_reached(); } }
/** * Either displays a URL or invokes an command line with the supplied * terms appropriately embedded. */ void lk_launcher_launch (const LkBinding* binding, const gchar* terms) { char cwdbuf[1024]; GString* cmd; gchar* uterms, *command; LkBindingType type; /* figure out what we're supposed to do */ if (binding == NULL) { command = DEFAULT_COMMAND; type = DEFAULT_TYPE; } else { command = binding->argument; type = binding->type; } /* construct the actual command from it by replacing instances of %T * with the terms and %U with the URL encoded terms. */ cmd = g_string_new(command); /* first replace %U because we know that won't result in any '%T's * being inserted into the string because the url encoded terms * encode all %s */ uterms = url_encode(terms); g_string_replace(cmd, "%U", uterms); g_free(uterms); g_string_replace(cmd, "%T", terms); /* now we either invoke a program or launch a URL */ switch (type) { case EXEC: gnome_execute_shell(getcwd(cwdbuf, 1024), cmd->str); break; default: case URL: gnome_url_show(cmd->str); break; } g_string_free(cmd, TRUE); }
void c2_html_gtkhtml_link_clicked (GtkHTML *gtkhtml, const gchar *url, gpointer data) { gchar *prefix, *buf; prefix = c2_str_get_word (0, url, ':'); buf = c2_preferences_get_interface_html_links (); if (c2_streq (buf, "default")) { if (c2_streq (prefix, "mailto")) { GtkWidget *composer; if ((composer = c2_composer_new (C2_HTML (data)->application))) { c2_composer_set_contents_from_link (C2_COMPOSER (composer), url); gtk_widget_show (composer); } } else gnome_url_show (url); } else { /* data3 = g_new0 (C2Pthread3, 1); data3->v1 = (gpointer) gtkhtml; data3->v2 = (gpointer) url; } else if (c2_streq (prefix, "http")) pthread_create (&thread, NULL, C2_PTHREAD_FUNC (on_html_http_link_clicked), data3); else if (c2_streq (prefix, "ftp")) L*/ } g_free (prefix); g_free (buf); }
static gboolean visit_url_gnome_cb( GtkWidget *widget, gpointer *data) { gnome_url_show((gchar *) data); g_free(data); return(TRUE); }
static void fm_url_hook(GtkAboutDialog *about, gchar const* link) { gnome_url_show(link, NULL); }