static void browse_folder (char *dir) { #ifdef WIN32 /* no need for file:// in ShellExecute() */ fe_open_url (dir); #else char buf[512]; snprintf (buf, sizeof (buf), "file://%s", dir); fe_open_url (buf); #endif }
static gboolean url_treeview_url_clicked_cb (GtkWidget *view, GdkEventButton *event, gpointer data) { GtkTreeIter iter; gchar *url; if (!event || !gtkutil_treeview_get_selected (GTK_TREE_VIEW (view), &iter, URL_COLUMN, &url, -1)) { return FALSE; } switch (event->button) { case 1: if (event->type == GDK_2BUTTON_PRESS) fe_open_url (url); break; case 3: menu_urlmenu (event, url); break; default: break; } g_free (url); return FALSE; }
static void browse_folder (char *dir) { char buf[512]; snprintf (buf, sizeof (buf), "file://%s", dir); fe_open_url (buf); }
static gboolean url_treeview_url_clicked_cb (GtkWidget *view, GdkEventButton *event, gpointer data) { GtkTreeIter iter; gchar *url; GtkTreeSelection *sel; GtkTreePath *path; GtkTreeView *tree = GTK_TREE_VIEW (view); if (!event || !gtk_tree_view_get_path_at_pos (tree, event->x, event->y, &path, 0, 0, 0)) return FALSE; /* select what they right-clicked on */ sel = gtk_tree_view_get_selection (tree); gtk_tree_selection_unselect_all (sel); gtk_tree_selection_select_path (sel, path); gtk_tree_path_free (path); if (!gtkutil_treeview_get_selected (GTK_TREE_VIEW (view), &iter, URL_COLUMN, &url, -1)) return FALSE; switch (event->button) { case 1: if (event->type == GDK_2BUTTON_PRESS) fe_open_url (url); break; case 3: menu_urlmenu (event, url); break; default: break; } g_free (url); return FALSE; }
static void menu_docs (GtkWidget *wid, gpointer none) { fe_open_url ("http://confluence.atheme.org/display/CON/Conspire+Help"); }