示例#1
0
G_MODULE_EXPORT void chatwith_node(GtkWidget *wiggy, gpointer data)
{
	char	str[MAX_PATH+1];
	int		i;

	gtk_tree_selection_selected_foreach(sel
			,get_lastselected_node
			,&i);
	sprintf(str,"gtkchat %d",i);
	run_external(cfg.exec_dir,str);
}
示例#2
0
void userlist_edituser(GtkWidget *wiggy, gpointer data)
{
	char	str[MAX_PATH+1];
	int		i;
	GtkWidget	*w;

	w=glade_xml_get_widget(lxml, "lUserList");
	gtk_tree_selection_selected_foreach(gtk_tree_view_get_selection (GTK_TREE_VIEW (w))
			,get_lastselected_user
			,&i);

	sprintf(str,"gtkuseredit %d",i);
	run_external(cfg.exec_dir,str);
}
示例#3
0
G_MODULE_EXPORT void userlist_edituser(GtkWidget *wiggy, gpointer data)
{
	char	str[MAX_PATH+1];
	int		i;
	GtkWidget	*w;

	w=GTK_WIDGET(gtk_builder_get_object(builder, "lUserList"));
	gtk_tree_selection_selected_foreach(gtk_tree_view_get_selection (GTK_TREE_VIEW (w))
			,get_lastselected_user
			,&i);

	sprintf(str,"gtkuseredit %d",i);
	run_external(cfg.exec_dir,str);
}
void LauncherApp::jreInstall()
{
#ifdef __WINDOWS__
  if (!run_external(params["jre"]))
#else
  if (!wxShell(params["jre"]))
#endif
  {
    error(_("Could not launch the JRE installation process."));
  }

  runJRE();
  completed = true;
}
void LauncherApp::runJRE()
{
  if (!wxFile::Exists(params["jar"]))
  {
    error(_("There is no installer to launch."));
  }

  wxString cmd = javaExecPath + wxString(" -jar ") + params["jar"];
  if (!run_external(cmd))
  {
    error(_("The installer launch failed."));
  }

  completed = true;
}
void LauncherApp::netDownload()
{
  wxString browser;

#ifdef __WINDOWS__
  // We use the default browser.
  browser = "rundll32 url.dll,FileProtocolHandler ";
#endif

#ifdef __UNIX__
  // We try some browsers and use the first successful one.
  std::list<std::pair<wxString, wxString> > commands;
  std::pair<wxString, wxString> cmd;
  cmd.first = "konqueror "; cmd.second = "konqueror -v";
  commands.push_back(cmd);
  cmd.first = "mozilla -splash "; cmd.second = "mozilla -v";
  commands.push_back(cmd);
  cmd.first = "firefox -splash "; cmd.second = "firefox -v";
  commands.push_back(cmd);
  cmd.first = "firebird -splash "; cmd.second = "firebird -v";
  commands.push_back(cmd);
  cmd.first = "opera "; cmd.second = "opera -v";
  commands.push_back(cmd);
  cmd.first = "netscape "; cmd.second = "netscape -v";
  commands.push_back(cmd);
  std::list<std::pair<wxString, wxString> >::iterator it;
  for (it = commands.begin(); it != commands.end(); ++it)
  {
    if (wxExecute(it->second, wxEXEC_SYNC) == 0)
    {
      browser = it->first;
      break;
    }
  }
#endif

  if (run_external(browser + params["download"]))
  {
    completed = true;
  }
  else
  {
    error(_("Could not find a web browser."));
  }
}
示例#7
0
G_MODULE_EXPORT void edituseron_node(GtkWidget *wiggy, gpointer data)
{
	char	str[MAX_PATH+1];
	int		i;
	node_t	node;

	gtk_tree_selection_selected_foreach(sel
			,get_lastselected_node
			,&i);

	if((i=getnodedat(&cfg,i,&node,NULL))) {
		sprintf(str,"Error reading node data (%d)!",i);
		display_message("Read Error",str,"gtk-dialog-error");
	}
	else {
		sprintf(str,"gtkuseredit %d",node.useron);
		run_external(cfg.exec_dir,str);
	}
}
示例#8
0
/*
 * eval - Evaluate the command line that the user has just typed in
 *
 * If the user has requested a built-in command (quit, jobs, bg or fg)
 * then execute it immediately. Otherwise, fork a child process and
 * run the job in the context of the child. If the job is running in
 * the foreground, wait for it to terminate and then return.  Note:
 * each child process must have a unique process group ID so that our
 * background children don't receive SIGINT (SIGTSTP) from the kernel
 * when we type ctrl-c (ctrl-z) at the keyboard.
*/
void eval(char *cmdline)
{
    if (isblankstr(cmdline)) {
        return;
    }

    char *argv[MAXARGS];
    int bg = parseline(cmdline, argv);

    /* DBG(("bg:%d cmdline:%s", bg, cmdline)); */

    /* argv[0] contains the command name */
    if (is_builtin(argv[0])) {
        /* return run_builtin(bg, cmdline, argv); */
        builtin_cmd(argv);
    }
    else {
        run_external(bg, cmdline, argv);
    }
}
示例#9
0
/* Show user list */
G_MODULE_EXPORT void on_list1_activate(GtkWidget *wiggy, gpointer data)
{
	run_external(cfg.exec_dir,"gtkuserlist");
}
示例#10
0
G_MODULE_EXPORT void on_configure1_activate(GtkWidget *wiggy, gpointer data)
{
	run_external(cfg.exec_dir,"scfg");
}