/**
* \file FormForks.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Angus Leeming
+ *
+ * Full author contact details are available in file CREDITS
* \date 2001-10-22
*/
typedef FormCB<ControlForks, FormDB<FD_forks> > base_class;
-FormForks::FormForks(ControlForks & c, Dialogs & d)
- : base_class(c, d, _("Child processes"))
+FormForks::FormForks()
+ : base_class(_("Child processes"))
{}
// Set up the tooltip mechanism
string str = _("All currently running child processes forked by LyX.");
tooltips().init(dialog_->browser_children, str);
+ // Work-around xforms' bug; enable tooltips for browser widgets.
+ setPrehandler(dialog_->browser_children);
str = _("A list of all child processes to kill.");
tooltips().init(dialog_->browser_kill, str);
+ // Work-around xforms' bug; enable tooltips for browser widgets.
+ setPrehandler(dialog_->browser_kill);
str = _("Add all processes to the list of processes to kill.");
tooltips().init(dialog_->button_all, str);
return;
string const current_pid_str =
- getSelectedStringFromBrowser(dialog_->browser_kill);
+ getString(dialog_->browser_kill);
pid_t const current_pid = strToInt(current_pid_str);
vector<pid_t> pids = controller().getPIDs();
for (int i = 1; i <= fl_get_browser_maxline(dialog_->browser_kill);
++i) {
string const pid_str =
- getStringFromBrowser(dialog_->browser_kill, i);
+ getString(dialog_->browser_kill, i);
pid_t const pid = strToInt(pid_str);
vector<pid_t>::const_iterator it =
find(pids.begin(), pids.end(), pid);
{
// Get the list of all processes to kill.
vector<string> const kill_vec =
- getVectorFromBrowser(dialog_->browser_kill);
+ getVector(dialog_->browser_kill);
if (kill_vec.empty())
return;
for (int i = 1; i <= fl_get_browser_maxline(dialog_->browser_children);
++i) {
string const selection =
- getStringFromBrowser(dialog_->browser_children, i);
+ getString(dialog_->browser_children, i);
string pid_str;
split(selection, pid_str, '\t');
// be added to this list if so desired.
string const selection =
- getSelectedStringFromBrowser(dialog_->browser_children);
+ getString(dialog_->browser_children);
string pid_str;
split(selection, pid_str, '\t');
vector<string> const kill_vec =
- getVectorFromBrowser(dialog_->browser_kill);
+ getVector(dialog_->browser_kill);
vector<string>::const_iterator it =
find(kill_vec.begin(), kill_vec.end(), pid_str);
// 3. Disable the add button.
string const pid_str =
- getSelectedStringFromBrowser(dialog_->browser_kill);
+ getString(dialog_->browser_kill);
// Find this string in the list of all child processes
vector<string> const child_vec =
- getVectorFromBrowser(dialog_->browser_children);
+ getVector(dialog_->browser_children);
vector<string>::const_iterator it =
find_if(child_vec.begin(), child_vec.end(), FindPID(pid_str));
vector<string> const getPIDvector(FL_OBJECT * ob)
{
- vector<string> vec = getVectorFromBrowser(ob);
+ vector<string> vec = getVector(ob);
if (vec.empty())
return vec;
// 3. Deactivate the "add" button.
- string const selection =
- getSelectedStringFromBrowser(dialog_->browser_children);
+ string const selection = getString(dialog_->browser_children);
string pid_str;
split(selection, pid_str, '\t');
vector<string> const kill_vec =
- getVectorFromBrowser(dialog_->browser_kill);
+ getVector(dialog_->browser_kill);
vector<string>::const_iterator it =
find(kill_vec.begin(), kill_vec.end(), pid_str);