Exemplo n.º 1
0
void
plugingui_load (void)
{
	/* let's do it the Perl way */
	const char *xdir;
	char *sub_dir;

	xdir = get_xdir_utf8 ();
	sub_dir = malloc (strlen (xdir) + 8);
	strcpy (sub_dir, xdir);
	strcat (sub_dir, "/addons");

	gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
#if 0	/* native file dialogs */
#ifdef WIN32
							"Plugins and Scripts\0*.dll;*.lua;*.pl;*.py;*.tcl\0"
							"All files\0*.*\0\0", 0);
#else
#endif
#endif	/* native file dialogs */
#ifdef WIN32
							sub_dir, "*.dll;*.lua;*.pl;*.py;*.tcl", FRF_ADDFOLDER|FRF_FILTERISINITIAL|FRF_EXTENSIONS);
#else
							sub_dir, "*.so;*.lua;*.pl;*.py;*.tcl", FRF_ADDFOLDER|FRF_FILTERISINITIAL|FRF_EXTENSIONS);
#endif

	free (sub_dir);
}
Exemplo n.º 2
0
void
fe_dcc_send_filereq (struct session *sess, char *nick)
{
	char tbuf[128];

	nick = strdup (nick);
	snprintf (tbuf, sizeof tbuf, _("Send file to %s"), nick);
	gtkutil_file_req (tbuf, dcc_send_filereq_done, sess, nick, FALSE);
}
Exemplo n.º 3
0
static void
chanlist_save (GtkWidget * wid, server *serv)
{
	GtkTreeIter iter;
	GtkTreeModel *model = GET_MODEL (serv);

	if (gtk_tree_model_get_iter_first (model, &iter))
		gtkutil_file_req (_("Select an output filename"), chanlist_filereq_done,
								serv, NULL, FRF_WRITE);
}
Exemplo n.º 4
0
void
plugingui_load (void)
{
	char *sub_dir = g_build_filename (get_xdir(), "addons", NULL);

	gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
							sub_dir, "*."G_MODULE_SUFFIX";*.lua;*.pl;*.py;*.tcl;*.js", FRF_FILTERISINITIAL|FRF_EXTENSIONS);

	g_free (sub_dir);
}
Exemplo n.º 5
0
static void
pevent_save_cb (GtkWidget * wid, void *data)
{
	if (data)
	{
		gtkutil_file_req (_("Print Texts File"), pevent_save_req_cb, NULL,
								NULL, NULL, FRF_WRITE);
		return;
	}
	pevent_save (NULL);
}
Exemplo n.º 6
0
void
plugingui_load (void)
{
	gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
#ifdef WIN32
							"Plugins and Scripts\0*.dll;*.lua;*.pl;*.py;*.tcl\0"
							"All files\0*.*\0\0", 0);
#else
							NULL, FRF_ADDFOLDER);
#endif
}
Exemplo n.º 7
0
void
fe_dcc_send_filereq (struct session *sess, char *nick, int maxcps, int passive)
{
	char tbuf[128];
	struct my_dcc_send *mdc;
	
	mdc = malloc (sizeof (*mdc));
	mdc->sess = sess;
	mdc->nick = strdup (nick);
	mdc->maxcps = maxcps;
	mdc->passive = passive;

	snprintf (tbuf, sizeof tbuf, _("Send file to %s"), nick);
	gtkutil_file_req (tbuf, dcc_send_filereq_file, mdc, NULL, FRF_MULTIPLE);
}
Exemplo n.º 8
0
void
fe_dcc_send_filereq (struct session *sess, char *nick, int maxcps, int passive)
{
	char* tbuf = g_strdup_printf (_("Send file to %s"), nick);

	struct my_dcc_send *mdc = g_new (struct my_dcc_send, 1);
	mdc->sess = sess;
	mdc->nick = g_strdup (nick);
	mdc->maxcps = maxcps;
	mdc->passive = passive;

	gtkutil_file_req (tbuf, dcc_send_filereq_file, mdc, prefs.hex_dcc_dir, NULL, FRF_MULTIPLE|FRF_FILTERISINITIAL);

	g_free (tbuf);
}
Exemplo n.º 9
0
void
plugingui_load (void)
{
	char *sub_dir;

	sub_dir = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "addons", get_xdir());

	gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
#ifdef WIN32
							sub_dir, "*.dll;*.lua;*.pl;*.py;*.tcl", FRF_ADDFOLDER|FRF_FILTERISINITIAL|FRF_EXTENSIONS);
#else
							sub_dir, "*.so;*.lua;*.pl;*.py;*.tcl", FRF_ADDFOLDER|FRF_FILTERISINITIAL|FRF_EXTENSIONS);
#endif

	g_free (sub_dir);
}
Exemplo n.º 10
0
void
plugingui_load (void)
{
    char *sub_dir;

    sub_dir = g_build_filename (get_xdir(), "addons", NULL);

    gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
#ifdef WIN32
                      sub_dir, "*.dll;*.lua;*.pl;*.py;*.tcl;*.js", FRF_FILTERISINITIAL|FRF_EXTENSIONS);
#else
                      sub_dir, "*.so;*.lua;*.pl;*.py;*.tcl;*.js", FRF_FILTERISINITIAL|FRF_EXTENSIONS);
#endif

    g_free (sub_dir);
}
Exemplo n.º 11
0
static void
pevent_load_cb (GtkWidget * wid, void *data)
{
	gtkutil_file_req (_("Print Texts File"), pevent_load_req_cb, NULL, NULL, NULL, 0);
}
Exemplo n.º 12
0
static void
url_button_save (void)
{
	gtkutil_file_req (_("Select an output filename"),
							url_save_callback, NULL, get_xdir (), NULL, FRF_WRITE|FRF_FILTERISINITIAL);
}
Exemplo n.º 13
0
void
plugingui_load (void)
{
    gtkutil_file_req (_("Select a Plugin or Script to load"),
                      plugingui_load_cb, current_sess, NULL, FRF_ADDFOLDER);
}
Exemplo n.º 14
0
static void
menu_savebuffer (GtkWidget * wid, gpointer none)
{
	gtkutil_file_req (_("Select an output filename"), savebuffer_req_done,
							current_sess, NULL, FRF_WRITE);
}
Exemplo n.º 15
0
static int
rawlog_savebutton (GtkWidget * wid, server *serv)
{
	gtkutil_file_req (_("Save As..."), rawlog_save, serv, NULL, NULL, FRF_WRITE);
	return FALSE;
}
Exemplo n.º 16
0
static void
url_button_save (void)
{
	gtkutil_file_req (_("Select an output filename"),
							url_save_callback, NULL, NULL, NULL, FRF_WRITE);
}
Exemplo n.º 17
0
static void
url_button_save (void)
{
	gtkutil_file_req (_("Select a file to save to"),
							url_save_callback, 0, 0, TRUE);
}