Exemplo n.º 1
0
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
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
static void
browse_folder (char *dir)
{
	char buf[512];

	snprintf (buf, sizeof (buf), "file://%s", dir);
	fe_open_url (buf);
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
0
static void
menu_docs (GtkWidget *wid, gpointer none)
{
	fe_open_url ("http://confluence.atheme.org/display/CON/Conspire+Help");
}