]> git.lyx.org Git - features.git/commitdiff
Remove the Forks dialog.
authorAngus Leeming <leeming@lyx.org>
Wed, 17 Mar 2004 21:21:47 +0000 (21:21 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 17 Mar 2004 21:21:47 +0000 (21:21 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8497 a592a061-630c-0410-9148-cb99ea01b6c8

33 files changed:
lib/ChangeLog
lib/ui/classic.ui
lib/ui/stdmenus.ui
po/POTFILES.in
src/ChangeLog
src/LyXAction.C
src/frontends/ChangeLog
src/frontends/Dialogs.h
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlForks.C [deleted file]
src/frontends/controllers/ControlForks.h [deleted file]
src/frontends/controllers/Makefile.am
src/frontends/gnome/ChangeLog
src/frontends/gnome/Dialogs.C
src/frontends/gnome/Dialogs2.C
src/frontends/gnome/Dialogs_impl.h
src/frontends/gnome/Makefile.am
src/frontends/gtk/ChangeLog
src/frontends/gtk/Makefile.am
src/frontends/guiapi.C
src/frontends/guiapi.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/Dialogs2.C
src/frontends/qt2/lyx_gui.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Dialogs2.C
src/frontends/xforms/FormForks.C [deleted file]
src/frontends/xforms/FormForks.h [deleted file]
src/frontends/xforms/Makefile.am
src/frontends/xforms/forms/Makefile.am
src/frontends/xforms/forms/form_forks.fd [deleted file]
src/lfuns.h
src/lyxfunc.C

index fca80e724ec0ae9821f47053b492a58fffc79f25..0923b1f06654d443dd3eae47d10efca17da2806e 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * ui/classic.ui:
+       * ui/stdmenus.ui: remove "dialog-show forks".
+
 2004-03-15  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 
        * doc/LaTeXConfig.lyx.in: fix entry for REVTeX (bug #1533)
index 779ca99c81016748fef1ec762761fe62d954e561..de54f0b631c46b7284e907a6597431197c0238a2 100644 (file)
@@ -352,7 +352,6 @@ Menuset
                Separator
                Item "LaTeX Logfile|L" "dialog-show latexlog"
                Item "Table of Contents|C" "toc-view"
-               Item "Child Processes|o" "dialog-show forks"
                Item "TeX Information|X" "dialog-show texinfo"
        End
 
index fd83c7bd73216048cc6e4b0eddd1f8021eb46c46..1962093ab7e5a083c569ee4b242929c15abce26d 100644 (file)
@@ -412,7 +412,6 @@ Menuset
                Item "Spellchecker...|S" "dialog-show spellchecker"
                OptItem "Thesaurus...|T" "thesaurus-entry"
                OptItem "Check TeX|h" "buffer-chktex"
-               Item "View Child Processes...|C" "dialog-show forks"
                Item "TeX Information...|I" "dialog-show texinfo"
                Separator
 # A LOT of applications have Tools->Prefs. Remember this
index e2a9c1d57a61aa1c36fc23fddade4b425ff73f46..42c95124bb278e92f6fc5cfa34bd56bb57e76001 100644 (file)
@@ -105,7 +105,6 @@ src/frontends/xforms/FormErrorList.C
 src/frontends/xforms/FormExternal.C
 src/frontends/xforms/FormFiledialog.C
 src/frontends/xforms/FormFloat.C
-src/frontends/xforms/FormForks.C
 src/frontends/xforms/FormGraphics.C
 src/frontends/xforms/FormInclude.C
 src/frontends/xforms/FormMathsBitmap.C
@@ -177,7 +176,6 @@ src/lyxfont.C
 src/lyxfunc.C
 src/lyxrc.C
 src/lyxvc.C
-src/mathed/formula.C
 src/mathed/formulamacro.C
 src/mathed/math_hullinset.C
 src/mathed/math_macrotemplate.C
@@ -192,8 +190,6 @@ src/paragraph.C
 src/paragraph_funcs.C
 src/rowpainter.C
 src/support/globbing.C
-src/support/path_defines.C
-src/tex2lyx/lengthcommon.C
 src/text.C
 src/text2.C
 src/text3.C
index 6855488417f092993f0dfc458aa4f0812a8ac619..6cb26d3160f0208cf307502591f3c6256774f2b9 100644 (file)
@@ -1,3 +1,11 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * lfuns.h:
+       * LyXAction.C (init): remove LFUN_FORKS_KILL.
+
+       * lyxfunc.C (getStatus, dispatch) remove lfuns to show the forks
+       dialog and to kill a forked process.
+
 2004-03-17  Alfredo Braunstein  <abraunst@lyx.org>
 
        * text2.C (setCursorFromCoordinates): fix font problem
index f424e4c8d805b5bb5281599aee8b65e272454ef6..c166089e2c82eb5d7f096476baab1c45eaeeb7d0 100644 (file)
@@ -299,7 +299,6 @@ void LyXAction::init()
                { LFUN_TRANSPOSE_CHARS, "chars-transpose", Noop },
                { LFUN_FLOAT_LIST, "float-list", Noop },
                { LFUN_ESCAPE, "escape", ReadOnly },
-               { LFUN_FORKS_KILL, "kill-forks", NoBuffer },
                { LFUN_TOOLTIPS_TOGGLE, "toggle-tooltips", NoBuffer },
                { LFUN_TRACK_CHANGES, "track-changes", Noop },
                { LFUN_MERGE_CHANGES, "merge-changes", Noop },
index 8b69af6d19de182dca79ce6ec471bec13c25ba5d..b143e27c1ee2d02eb8f19549317644f98b44cdc7 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.h (showFoks): removed.
+
+       * guiapi.[Ch] (gui_ShowForks): removed.
+
 2004-01-25  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.h (showSearch):
index ddaf2c05df1e1b842214459d6a4f23dde05a2d15..daf888cfbada1f755df6014070ff875393a9aafb 100644 (file)
@@ -67,8 +67,6 @@ public:
        //@{
        ///
        void showDocument();
-       /// show all forked child processes
-       void showForks();
        ///
        void showPreamble();
        ///
index 1c3da24e2161944d17e60e9660ce9cebb45b6b1a..61c503d1ad6ee1a2a47bcdff9fe648d6f8219449 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * ControlForks.[Ch]: removed.
+
+       * Makefile.am: remove mention of ControlForks.[Ch].
+
 2004-03-07  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * biblio.[Ch]:
diff --git a/src/frontends/controllers/ControlForks.C b/src/frontends/controllers/ControlForks.C
deleted file mode 100644 (file)
index 57bdf8b..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * \file ControlForks.C
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#include <config.h>
-
-#include "ControlForks.h"
-#include "ViewBase.h"
-
-#include "lyxfunc.h"
-#include "funcrequest.h"
-
-#include "support/forkedcontr.h"
-#include "support/tostr.h"
-
-#include <boost/bind.hpp>
-
-
-using lyx::support::ForkedcallsController;
-
-using std::string;
-using std::vector;
-
-
-ControlForks::ControlForks(LyXView & lv, Dialogs & d)
-       : ControlDialogBI(lv, d)
-{}
-
-
-vector<pid_t> const ControlForks::getPIDs() const
-{
-       return ForkedcallsController::get().getPIDs();
-}
-
-
-string const ControlForks::getCommand(pid_t pid) const
-{
-       return ForkedcallsController::get().getCommand(pid);
-}
-
-
-void ControlForks::kill(pid_t pid)
-{
-       pids_.push_back(pid);
-}
-
-
-void ControlForks::apply()
-{
-       if (!bufferIsAvailable())
-               return;
-
-       view().apply();
-
-       // Nothing to apply?
-       if (pids_.empty())
-               return;
-
-       for (vector<pid_t>::const_iterator it = pids_.begin();
-            it != pids_.end(); ++it) {
-               lyxfunc().dispatch(FuncRequest(LFUN_FORKS_KILL, tostr(*it)));
-       }
-
-       pids_.clear();
-}
-
-
-void ControlForks::setParams()
-{
-       if (childrenChanged_.connected())
-               return;
-
-       pids_.clear();
-
-       ForkedcallsController & fcc = ForkedcallsController::get();
-       childrenChanged_ =
-               fcc.childrenChanged.connect(boost::bind(&ControlForks::update, this));
-}
-
-
-void ControlForks::clearParams()
-{
-       pids_.clear();
-       childrenChanged_.disconnect();
-}
diff --git a/src/frontends/controllers/ControlForks.h b/src/frontends/controllers/ControlForks.h
deleted file mode 100644 (file)
index d88b1af..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// -*- C++ -*-
-/**
- * \file ControlForks.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef CONTROLFORKS_H
-#define CONTROLFORKS_H
-
-#include "ControlDialog_impl.h"
-
-#include <boost/signals/connection.hpp>
-
-#include <vector>
-#include <sys/types.h>
-
-
-/** A controller for dialogs that display the child processes forked by LyX.
-    Also provides an interface enabling them to be killed prematurely.
-*/
-class ControlForks : public ControlDialogBI {
-public:
-       ///
-       ControlForks(LyXView &, Dialogs &);
-       ///
-       std::vector<pid_t> const getPIDs() const;
-       ///
-       std::string const getCommand(pid_t) const;
-       ///
-       void kill(pid_t);
-private:
-       ///
-       virtual void apply();
-       /// disconnect from the ForkedcallsController
-       virtual void clearParams();
-       /// connect to the ForkedcallsController
-       virtual void setParams();
-       /// Connection to the ForkedcallsController signal
-       boost::signals::connection childrenChanged_;
-       /// The list of PIDs to kill
-       std::vector<pid_t> pids_;
-};
-
-#endif // CONTROLFORKS_H
index 2efe63eb9747ddca2925a4e51a1c2ded6d3ee305..d5944dc4cb568a096cb003581b9ad352a88760a3 100644 (file)
@@ -60,8 +60,6 @@ libcontrollers_la_SOURCES= \
        ControlExternal.h \
        ControlFloat.C \
        ControlFloat.h \
-       ControlForks.C \
-       ControlForks.h \
        ControlGraphics.C \
        ControlGraphics.h \
        ControlInclude.C \
index 7f1bdeb618758316077065af0e5aea2d9da9d8bb..9b46d77add40dedb372e224c30487425f7fbe6e4 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs.C, Dialogs2.C, Dialogs_impl.h, Makefile.am: remove
+       mention of the forks dialog.
+
 2004-02-01  Lars Gullik Bjonnes  <larsbj@gullik.net>
 
        * GFloat.C (update): "c" -> 'c' in calls to contains
index dacdef266f426a02754a07bb0038b125bd31d960..99501a66cd7c030c9f9384dae38c26b9d92ef004 100644 (file)
@@ -35,7 +35,6 @@ Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
          external(lv, d),
          file(lv, d),
          floats(lv, d),
-         forks(lv, d),
          graphics(lv, d),
          include(lv, d),
          logfile(lv, d),
index 7ba8db630ef5e3154aef2b861276d853b5d8ae29..66d20ef7982452a6065a53af9b8b669f7f133897 100644 (file)
@@ -57,12 +57,6 @@ void Dialogs::showFloat(InsetFloat * ifl)
 }
 
 
-void Dialogs::showForks()
-{
-       pimpl_->forks.controller().show();
-}
-
-
 void Dialogs::showGraphics(InsetGraphics * ig)
 {
        pimpl_->graphics.controller().showInset(ig);
index 1f5d933e841dd51ded094fcfe364f56eee34a1d5..1dfe4c9f5b88363f84289658cb142bf0c946622b 100644 (file)
 #include "ControlFloat.h"
 #include "GFloat.h"
 
-#include "ControlForks.h"
-#include "FormForks.h"
-#include "forms/form_forks.h"
-
 #include "ControlGraphics.h"
 #include "FormGraphics.h"
 #include "forms/form_graphics.h"
@@ -159,9 +155,6 @@ FileDialog;
 typedef GUI<ControlFloat, GFloat, NoRepeatedApplyReadOnlyPolicy, gnomeBC>
 FloatDialog;
 
-typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
-ForksDialog;
-
 typedef GUI<ControlGraphics, FormGraphics, NoRepeatedApplyReadOnlyPolicy, xformsBC>
 GraphicsDialog;
 
@@ -225,7 +218,6 @@ struct Dialogs::Impl {
        ExternalDialog      external;
        FileDialog          file;
        FloatDialog         floats;
-       ForksDialog         forks;
        GraphicsDialog      graphics;
        IncludeDialog       include;
        LogFileDialog       logfile;
index 94419ba803cddd181f3f8a8fdd31295250b9cd85..1a75af66af5670ef579f2b982e97876f1b78de5c 100644 (file)
@@ -31,7 +31,6 @@ xforms_objects = \
        ../xforms/FormCitation.lo \
        ../xforms/FormDocument.lo \
        ../xforms/FormExternal.lo \
-       ../xforms/FormForks.lo \
        ../xforms/FormGraphics.lo \
        ../xforms/FormInclude.lo \
        ../xforms/FormIndex.lo \
@@ -88,7 +87,6 @@ xforms_objects = \
        ../xforms/forms/form_external.lo \
        ../xforms/forms/form_filedialog.lo \
        ../xforms/forms/form_float.lo \
-       ../xforms/forms/form_forks.lo \
        ../xforms/forms/form_graphics.lo \
        ../xforms/forms/form_include.lo \
        ../xforms/forms/form_index.lo \
index 42bc3f1b271a429a6c4cceea141aa27dfcb5945b..c85b401e9a663513f757b5c847e10bc55cdf23dd 100644 (file)
@@ -1,4 +1,9 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * Makefile.am: remove mention of the forks dialog.
+
 2004-02-09  Huang Ying <hying_caritas@163.com>
+
        * GXpmBtnTbl.C : add a GXpmBtnTbl class to automate creating a Xpm
        Button Table according to a set of xpm data or xbm data, is equivalent
        with bmtable in xforms frontend.
@@ -7,6 +12,7 @@
        * GMathDelim.C : math delimiter dialog.
 
 2004-02-07  Huang Ying <hying_caritas@163.com>
+
        * GViewBase.C : add addCancel, addOK, addApply, add Restore to 
        facilitate setup buttons signal.
        * GAboutLyx.C : using addxxx series functions.
index 69af83c3ba5f05270dc8aeb479e48b6220ace61a..f5bfda984ae491d85b9e483bbc1dcbfdd82ba894 100644 (file)
@@ -93,7 +93,6 @@ xforms_objects = \
        ../xforms/FormERT.lo \
        ../xforms/FormExternal.lo \
        ../xforms/FormFloat.lo \
-       ../xforms/FormForks.lo \
        ../xforms/FormGraphics.lo \
        ../xforms/FormInclude.lo \
        ../xforms/FormLog.lo \
index 9cd0d32a00a5ff31fa34b1a948f7d17ce81b6983..49edd6ae41bed9115ceefa862848cbce9eb184f4 100644 (file)
@@ -28,12 +28,6 @@ void gui_ShowDocument(Dialogs & d)
 }
 
 
-void gui_ShowForks(Dialogs & d)
-{
-       d.showForks();
-}
-
-
 void gui_ShowPreamble(Dialogs & d)
 {
        d.showPreamble();
index 77e3c46f3c3d38f7b6a16e4387b177dbd20e3d26..4250df825c87153495b6898be68795869dcf0767 100644 (file)
@@ -21,7 +21,6 @@ extern "C" {
 void gui_show_dialog(Dialogs *, char const * name, char const * data);
 
 void gui_ShowDocument(Dialogs &);
-void gui_ShowForks(Dialogs &);
 void gui_ShowPreamble(Dialogs &);
 void gui_ShowPreferences(Dialogs &);
 void gui_ShowPrint(Dialogs &);
index f8ba471690d2f9122cc4ede8a1bd9cf7fc74df04..b217d52f64032fa0fa006776835cc9527a419940 100644 (file)
@@ -1,3 +1,7 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs2.C, lyx_gui.C: remove mention of the forks dialog.
+
 2004-03-07  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * QCitation.C:
index e419f68387f37221cb09323e0bdcea6e2e95c12f..1cf38f778910a8709e4d4a370d4adde62d57f392 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "QDocument.h"
 #include "QDocumentDialog.h"
-//#include "QForks.h"
 // Here would be an appropriate point to lecture on the evils
 // of the Qt headers, those most fucked up of disgusting ratholes.
 // But I won't.
@@ -94,10 +93,6 @@ void Dialogs::showDocument()
 }
 
 
-void Dialogs::showForks()
-{}
-
-
 void Dialogs::showPreamble()
 {
        pimpl_->document.controller().show();
index 4b95e12f151491a598036d6dc33bac92f1e46292..2636e2805c40119b8defb01e210721ec9187b7a5 100644 (file)
@@ -232,7 +232,7 @@ FuncStatus getStatus(FuncRequest const & ev)
        FuncStatus flag;
        switch (ev.action) {
        case LFUN_DIALOG_SHOW:
-               if (ev.argument == "preamble" || ev.argument == "forks")
+               if (ev.argument == "preamble")
                        flag.unknown(true);
                break;
        case LFUN_TOOLTIPS_TOGGLE:
index d6c3d49c0ad62e5703dd0b5242601723c2d09748..517e664cb72f5093389f984c48a48fe04eba43fd 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-17  Angus Leeming  <leeming@lyx.org>
+
+       * Dialogs2.C, FormForks.[Ch], Makefile.am:
+       * forms/Makefile.am, forms/form_forks.fd:
+       remove mention of the forks dialog.
+
 2004-03-07  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * FormCitation.C:
index 1d50034f263ba41e397f31d40d1df28136853ffc..082c8398d86dde4d6d037d92eb5c8e1ff61dfb82 100644 (file)
 #include "FormDocument.h"
 #include "forms/form_document.h"
 
-#include "ControlForks.h"
-#include "FormForks.h"
-#include "forms/form_forks.h"
-
 #include "ControlPreamble.h"
 #include "FormPreamble.h"
 #include "forms/form_preamble.h"
@@ -50,9 +46,6 @@
 typedef GUI<ControlDocument, FormDocument, NoRepeatedApplyReadOnlyPolicy, xformsBC>
 DocumentDialog;
 
-typedef GUI<ControlForks, FormForks, OkApplyCancelPolicy, xformsBC>
-ForksDialog;
-
 typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
 PreambleDialog;
 
@@ -73,7 +66,6 @@ struct Dialogs::Impl {
        Impl(LyXView & lv, Dialogs & d);
 
        DocumentDialog      document;
-       ForksDialog         forks;
        PreambleDialog      preamble;
        PreferencesDialog   preferences;
        PrintDialog         print;
@@ -84,7 +76,6 @@ struct Dialogs::Impl {
 
 Dialogs::Impl::Impl(LyXView & lv, Dialogs & d)
        : document(lv, d),
-         forks(lv, d),
          preamble(lv, d),
          preferences(lv, d),
          print(lv, d),
@@ -111,12 +102,6 @@ void Dialogs::showDocument()
 }
 
 
-void Dialogs::showForks()
-{
-       pimpl_->forks.controller().show();
-}
-
-
 void Dialogs::showPreamble()
 {
        pimpl_->preamble.controller().show();
diff --git a/src/frontends/xforms/FormForks.C b/src/frontends/xforms/FormForks.C
deleted file mode 100644 (file)
index 83d3392..0000000
+++ /dev/null
@@ -1,426 +0,0 @@
-/**
- * \file FormForks.C
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS.
- * \date 2001-10-22
- */
-
-#include <config.h>
-
-#include "FormForks.h"
-#include "ControlForks.h"
-#include "forms/form_forks.h"
-
-#include "Tooltips.h"
-#include "xforms_helpers.h"
-#include "xformsBC.h"
-
-#include "controllers/ButtonController.h"
-
-#include "support/lstrings.h"
-#include "support/tostr.h"
-
-#include "lyx_forms.h"
-
-using lyx::support::split;
-using lyx::support::strToInt;
-
-using std::find;
-using std::find_if;
-using std::string;
-using std::vector;
-
-
-typedef FormCB<ControlForks, FormDB<FD_forks> > base_class;
-
-FormForks::FormForks()
-       : base_class(_("Child Processes"))
-{}
-
-
-void FormForks::build() {
-       dialog_.reset(build_forks(this));
-
-       // It appears that the browsers aren't initialised properly.
-       // This fudge fixes tings.
-       fl_add_browser_line(dialog_->browser_children, " ");
-       fl_add_browser_line(dialog_->browser_kill, " ");
-       fl_clear_browser(dialog_->browser_children);
-       fl_clear_browser(dialog_->browser_kill);
-
-       // Manage the ok, apply, restore and cancel/close buttons
-       bcview().setOK(dialog_->button_ok);
-       bcview().setApply(dialog_->button_apply);
-       bcview().setCancel(dialog_->button_close);
-       bc().valid(false);
-
-       // Set up the tooltip mechanism
-       string str = _("All currently running child processes forked by LyX.");
-       tooltips().init(dialog_->browser_children, str);
-#if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL == 0)
-       // Work-around xforms' bug; enable tooltips for browser widgets.
-       setPrehandler(dialog_->browser_children);
-#endif
-
-       str = _("A list of all child processes to kill.");
-       tooltips().init(dialog_->browser_kill, str);
-#if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL == 0)
-       // Work-around xforms' bug; enable tooltips for browser widgets.
-       setPrehandler(dialog_->browser_kill);
-#endif
-
-       str = _("Add all processes to the list of processes to kill.");
-       tooltips().init(dialog_->button_all, str);
-
-       str = _("Add the currently selected child process to the list of processes to kill.");
-       tooltips().init(dialog_->button_add, str);
-
-       str = _("Remove the currently selected item from the list of processes to kill.");
-       tooltips().init(dialog_->button_remove, str);
-}
-
-
-void FormForks::update()
-{
-       if (!form())
-               return;
-
-       string const current_pid_str =
-               getString(dialog_->browser_kill);
-       pid_t const current_pid = strToInt(current_pid_str);
-
-       vector<pid_t> pids = controller().getPIDs();
-
-       // No child processes.
-       if (pids.empty()) {
-               if (fl_get_browser_maxline(dialog_->browser_kill) > 0)
-                       fl_clear_browser(dialog_->browser_kill);
-               if (fl_get_browser_maxline(dialog_->browser_children) > 0)
-                       fl_clear_browser(dialog_->browser_children);
-
-               setEnabled(dialog_->browser_children, false);
-               setEnabled(dialog_->browser_kill,     false);
-               setEnabled(dialog_->button_all,       false);
-               setEnabled(dialog_->button_add,       false);
-               setEnabled(dialog_->button_remove,    false);
-
-               return;
-       }
-
-       // Remove any processes from the kill browser that aren't in the
-       // vector of existing PIDs.
-       for (int i = 1; i <= fl_get_browser_maxline(dialog_->browser_kill);
-            ++i) {
-               string const pid_str =
-                       getString(dialog_->browser_kill, i);
-               pid_t const pid = strToInt(pid_str);
-               vector<pid_t>::const_iterator it =
-                       find(pids.begin(), pids.end(), pid);
-               if (it == pids.end())
-                       fl_delete_browser_line(dialog_->browser_kill, i);
-       }
-
-       // Build the children browser from scratch.
-       if (fl_get_browser_maxline(dialog_->browser_children) > 0)
-               fl_clear_browser(dialog_->browser_children);
-       int i = 1;
-       for (vector<pid_t>::const_iterator it = pids.begin();
-            it != pids.end(); ++it) {
-               string const pid_str = tostr(*it);
-               string const command = controller().getCommand(*it);
-               string const line = pid_str + '\t' + command;
-
-               fl_add_browser_line(dialog_->browser_children, line.c_str());
-
-               if (*it == current_pid)
-                       fl_select_browser_line(dialog_->browser_children, i);
-               ++i;
-       }
-
-       setEnabled(dialog_->browser_children, true);
-       setEnabled(dialog_->button_all,       true);
-       setEnabled(dialog_->button_add,       true);
-}
-
-
-void FormForks::apply()
-{
-       // Get the list of all processes to kill.
-       vector<string> const kill_vec =
-               getVector(dialog_->browser_kill);
-
-       if (kill_vec.empty())
-               return;
-
-       // Remove these items from the vector of child processes.
-       for (int i = 1; i <= fl_get_browser_maxline(dialog_->browser_children);
-            ++i) {
-               string const selection =
-                       getString(dialog_->browser_children, i);
-               string pid_str;
-               split(selection, pid_str, '\t');
-
-               vector<string>::const_iterator it =
-                       find(kill_vec.begin(), kill_vec.end(), pid_str);
-
-               if (it != kill_vec.end())
-                       fl_delete_browser_line(dialog_->browser_children, i);
-       }
-
-       // Clear the kill browser and deactivate appropriately.
-       fl_clear_browser(dialog_->browser_kill);
-       setEnabled(dialog_->browser_kill,  false);
-       setEnabled(dialog_->button_remove, false);
-
-       // Pass these pids to the controller for destruction.
-       for (vector<string>::const_iterator it = kill_vec.begin();
-            it != kill_vec.end(); ++it) {
-               pid_t const pid = strToInt(*it);
-               controller().kill(pid);
-       }
-
-}
-
-
-ButtonPolicy::SMInput FormForks::input(FL_OBJECT * ob, long)
-{
-       ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP;
-
-       if (ob == dialog_->browser_children) {
-               activate = input_browser_children();
-
-       } else if (ob == dialog_->browser_kill) {
-               activate = input_browser_kill();
-
-       } else if (ob == dialog_->button_all) {
-               activate = input_button_all();
-
-       } else if (ob == dialog_->button_add) {
-               activate = input_button_add();
-
-       } else if (ob == dialog_->button_remove) {
-               activate = input_button_remove();
-       }
-
-       return activate;
-}
-
-ButtonPolicy::SMInput FormForks::input_browser_children()
-{
-       // Selected an item in the browser containing a list of all child
-       // processes.
-
-       // 1. Highlight this item in the browser of processes to kill
-       //    if it is already there.
-
-       // 2. If it is there, enable the remove button so that it can
-       //    be removed from this list, if so desired.
-
-       // 3. If it isn't there, activate the add button so that it can
-       //    be added to this list if so desired.
-
-       string const selection =
-               getString(dialog_->browser_children);
-       string pid_str;
-       split(selection, pid_str, '\t');
-
-       vector<string> const kill_vec =
-               getVector(dialog_->browser_kill);
-
-       vector<string>::const_iterator it =
-               find(kill_vec.begin(), kill_vec.end(), pid_str);
-
-       fl_deselect_browser(dialog_->browser_kill);
-       if (it != kill_vec.end()) {
-               int const n = int(it - kill_vec.begin());
-               fl_select_browser_line(dialog_->browser_kill, n+1);
-               fl_set_browser_topline(dialog_->browser_kill, n+1);
-       }
-
-       setEnabled(dialog_->button_remove, it != kill_vec.end());
-       setEnabled(dialog_->button_add,    it == kill_vec.end());
-
-       return ButtonPolicy::SMI_NOOP;
-}
-
-
-namespace {
-
-class FindPID : public std::unary_function<string, bool> {
-public:
-       FindPID(string const & pid) : pid_(pid) {}
-       bool operator()(string const & line) const
-       {
-               if (line.empty())
-                       return false;
-
-               string pid_str;
-               split(line, pid_str, '\t');
-               return pid_str == pid_;
-       }
-
-private:
-       string pid_;
-};
-
-} // namespace anon
-
-
-ButtonPolicy::SMInput FormForks::input_browser_kill()
-{
-       // Selected an item in the browser containing a list of processes
-       // to kill.
-
-       // 1. Highlight this item in the browser of all child processes.
-
-       // 2. Enable the remove button so that it can removed from this list,
-       //    if so desired.
-
-       // 3. Disable the add button.
-
-       string const pid_str =
-               getString(dialog_->browser_kill);
-
-       // Find this string in the list of all child processes
-       vector<string> const child_vec =
-               getVector(dialog_->browser_children);
-
-       vector<string>::const_iterator it =
-               find_if(child_vec.begin(), child_vec.end(), FindPID(pid_str));
-
-       fl_deselect_browser(dialog_->browser_children);
-       if (it != child_vec.end()) {
-               int const n = int(it - child_vec.begin());
-               fl_select_browser_line(dialog_->browser_children, n+1);
-               fl_set_browser_topline(dialog_->browser_children, n+1);
-       }
-
-       setEnabled(dialog_->button_remove, true);
-       setEnabled(dialog_->button_add,    false);
-
-       return ButtonPolicy::SMI_NOOP;
-}
-
-
-namespace {
-
-vector<string> const getPIDvector(FL_OBJECT * ob)
-{
-       vector<string> vec = getVector(ob);
-       if (vec.empty())
-               return vec;
-
-       for (vector<string>::iterator it = vec.begin(); it != vec.end(); ++it) {
-               string pid_str;
-               split(*it, pid_str, '\t');
-               *it = pid_str;
-       }
-
-       return vec;
-}
-
-} // namespace anon
-
-
-ButtonPolicy::SMInput FormForks::input_button_all()
-{
-       // Pressed the "All" button.
-
-       // 1. Check that the browser of processes to kill doesn't already
-       //    contain the entire list.
-
-       // 2. If it doesn't, copy the PIDs of all child processes into the
-       //    browser of processes to kill.
-
-       // 3. Deactivate the "children" browser and the "add" and "all" buttons
-
-       // 4. Activate the "kill" browser and the "remove" button"
-
-       ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP;
-
-       vector<string> const pid_vec = getPIDvector(dialog_->browser_children);
-
-       // to resolve a warning about comparison between signed and unsigned.
-       int const pid_vec_size = int(pid_vec.size());
-
-       if (fl_get_browser_maxline(dialog_->browser_kill) != pid_vec_size) {
-               activate = ButtonPolicy::SMI_VALID;
-
-               fl_clear_browser(dialog_->browser_kill);
-               for (vector<string>::const_iterator it = pid_vec.begin();
-                    it != pid_vec.end(); ++it) {
-                       fl_add_browser_line(dialog_->browser_kill, it->c_str());
-               }
-
-               if (fl_get_browser_maxline(dialog_->browser_kill) >= 1)
-                       fl_set_browser_topline(dialog_->browser_kill, 1);
-       }
-
-       setEnabled(dialog_->browser_children, false);
-       setEnabled(dialog_->button_add,       false);
-       setEnabled(dialog_->button_all,       false);
-       setEnabled(dialog_->browser_kill,     true);
-       setEnabled(dialog_->button_remove,    true);
-
-       return activate;
-}
-
-
-ButtonPolicy::SMInput FormForks::input_button_add()
-{
-       // Pressed the "Add" button.
-
-       // 1. Copy the PID of the selected item in the browser of all child
-       //    processes over into the browser of processes to kill.
-
-       // 2. Activate the "kill" browser and the "remove" button.
-
-       // 3. Deactivate the "add" button.
-
-       string const selection = getString(dialog_->browser_children);
-       string pid_str;
-       split(selection, pid_str, '\t');
-
-       vector<string> const kill_vec =
-               getVector(dialog_->browser_kill);
-
-       vector<string>::const_iterator it =
-               find(kill_vec.begin(), kill_vec.end(), pid_str);
-
-       if (it == kill_vec.end()) {
-               fl_add_browser_line(dialog_->browser_kill, pid_str.c_str());
-               int const n = fl_get_browser_maxline(dialog_->browser_kill);
-               fl_select_browser_line(dialog_->browser_kill, n);
-       }
-
-       setEnabled(dialog_->browser_kill,  true);
-       setEnabled(dialog_->button_remove, true);
-       setEnabled(dialog_->button_add,    false);
-
-       return ButtonPolicy::SMI_VALID;
-}
-
-
-ButtonPolicy::SMInput FormForks::input_button_remove()
-{
-       // Pressed the "Remove" button.
-
-       // 1. Remove the selected item in the browser of processes to kill.
-
-       // 2. Activate the "add" button and "all" buttons.
-
-       // 3. Deactivate the "remove" button.
-
-       int const sel = fl_get_browser(dialog_->browser_kill);
-       fl_delete_browser_line(dialog_->browser_kill, sel);
-
-       setEnabled(dialog_->button_add,    true);
-       setEnabled(dialog_->button_all,    true);
-       setEnabled(dialog_->button_remove, false);
-
-       return ButtonPolicy::SMI_VALID;
-}
diff --git a/src/frontends/xforms/FormForks.h b/src/frontends/xforms/FormForks.h
deleted file mode 100644 (file)
index 41133cf..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// -*- C++ -*-
-/**
- * \file FormForks.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef FORMFORKS_H
-#define FORMFORKS_H
-
-
-#include "FormBase.h"
-
-class ControlForks;
-struct FD_forks;
-
-class FormForks : public FormCB<ControlForks, FormDB<FD_forks> > {
-public:
-       ///
-       FormForks();
-
-       /// preemptive handler for feedback messages
-       void feedbackCB(FL_OBJECT *, int);
-
-private:
-       /// Return the list of PIDs to kill to the controller.
-       virtual void apply();
-       /// Build the dialog.
-       virtual void build();
-       /// Update the dialog.
-       virtual void update();
-       /// Filter the inputs on callback from xforms
-       virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
-
-       ButtonPolicy::SMInput input_browser_children();
-       ButtonPolicy::SMInput input_browser_kill();
-       ButtonPolicy::SMInput input_button_all();
-       ButtonPolicy::SMInput input_button_add();
-       ButtonPolicy::SMInput input_button_remove();
-};
-
-#endif // FORMFORKS_H
index 77ad9d6193face84f9bd6b36b54e9999ddc26b3f..87528326e50d0af12bc1b81120b7e78c6fd59261 100644 (file)
@@ -96,8 +96,6 @@ libxforms_la_SOURCES = \
        FormExternal.h \
        FormFloat.C \
        FormFloat.h \
-       FormForks.C \
-       FormForks.h \
        FormGraphics.C \
        FormGraphics.h \
        FormInclude.C \
index fd98192efd5a7fc6a721a793789a329afd985f56..0904dce39b79755270acd6da39824bc51a50c2ad 100644 (file)
@@ -25,7 +25,6 @@ SRCS =  form_aboutlyx.fd \
        form_external.fd \
        form_filedialog.fd \
        form_float.fd \
-       form_forks.fd \
        form_graphics.fd \
        form_include.fd \
        form_maths_delim.fd \
diff --git a/src/frontends/xforms/forms/form_forks.fd b/src/frontends/xforms/forms/form_forks.fd
deleted file mode 100644 (file)
index c93f132..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-Magic: 13000
-
-Internal Form Definition File
-    (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-SnapGrid: 5
-
-=============== FORM ===============
-Name: form_forks
-Width: 535
-Height: 200
-Number of Objects: 9
-
---------------------
-class: FL_BOX
-type: FLAT_BOX
-box: 0 0 535 200
-boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: 
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: 
-callback: 
-argument: 
-
---------------------
-class: FL_BROWSER
-type: HOLD_BROWSER
-box: 5 20 330 140
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Forked child processes:|#F
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_South
-name: browser_children
-callback: C_FormBaseInputCB
-argument: 0
-
---------------------
-class: FL_BROWSER
-type: HOLD_BROWSER
-box: 410 20 120 140
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_TOP
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Kill processes:|#K
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_North FL_SouthEast
-name: browser_kill
-callback: C_FormBaseInputCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 340 25 65 25
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: All ->
-shortcut: 
-resize: FL_RESIZE_NONE
-gravity: FL_North FL_North
-name: button_all
-callback: C_FormBaseInputCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 360 55 25 25
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: @->
-shortcut: 
-resize: FL_RESIZE_NONE
-gravity: FL_North FL_North
-name: button_add
-callback: C_FormBaseInputCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 360 85 25 25
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: @4->
-shortcut: 
-resize: FL_RESIZE_NONE
-gravity: FL_North FL_North
-name: button_remove
-callback: C_FormBaseInputCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 250 170 90 25
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: OK
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_ok
-callback: C_FormBaseOKCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 345 170 90 25
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Apply|#A
-shortcut: 
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_apply
-callback: C_FormBaseApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 440 170 90 25
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Close|^[
-shortcut: 
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_close
-callback: C_FormBaseCancelCB
-argument: 0
-
-==============================
-create_the_forms
index 40ffc22c1fcc780096e42aa4f710727825a1bb9d..54319e8d8e4d46c5585269ad8843bcf7a6c8d75f 100644 (file)
@@ -282,58 +282,57 @@ enum kb_action {
        LFUN_TRANSPOSE_CHARS,           // Lgb 20010425
        LFUN_ESCAPE,                    // Lgb 20010517
        LFUN_THESAURUS_ENTRY,           // Levon 20010720
-       LFUN_FORKS_KILL,                // Angus 16 Feb 2002
        LFUN_TOOLTIPS_TOGGLE,           // Angus 8 Mar 2002
-       // 215
        LFUN_INSET_OPTARG,              // Martin 12 Aug 2002
+       // 215
        LFUN_MOUSE_PRESS,               // André 9 Aug 2002
        LFUN_MOUSE_MOTION,              // André 9 Aug 2002
        LFUN_MOUSE_RELEASE,             // André 9 Aug 2002
        LFUN_MOUSE_DOUBLE,              // André 9 Aug 2002
-       // 220
        LFUN_MOUSE_TRIPLE,              // André 9 Aug 2002
+       // 220
        LFUN_INSET_WRAP,                // Dekel 7 Apr 2002
        LFUN_TRACK_CHANGES,             // Levon 20021001 (cool date !)
        LFUN_MERGE_CHANGES,             // Levon 20021016
        LFUN_ACCEPT_CHANGE,             // Levon 20021016
-       // 225
        LFUN_REJECT_CHANGE,             // Levon 20021016
+       // 225
        LFUN_ACCEPT_ALL_CHANGES,        // Levon 20021016
        LFUN_REJECT_ALL_CHANGES,        // Levon 20021016
        LFUN_INSERT_BIBITEM,            // André 14 Feb 2003
        LFUN_DIALOG_SHOW,
-       // 230
        LFUN_DIALOG_SHOW_NEW_INSET,
+       // 230
        LFUN_DIALOG_SHOW_NEXT_INSET,
        LFUN_DIALOG_UPDATE,
        LFUN_DIALOG_HIDE,
        LFUN_DIALOG_DISCONNECT_INSET,
-       // 235
        LFUN_INSET_APPLY,
+       // 235
        LFUN_INSET_INSERT,
        LFUN_INSET_MODIFY,
        LFUN_INSET_DIALOG_UPDATE,
        LFUN_INSET_SETTINGS,
-       // 240
        LFUN_PARAGRAPH_APPLY,
+       // 240
        LFUN_PARAGRAPH_UPDATE,
        LFUN_EXTERNAL_EDIT,
        LFUN_INSERT_BRANCH,
        LFUN_INSET_DIALOG_SHOW,
-       // 245
        LFUN_INSERT_BOX,
+       // 245
        LFUN_INSERT_LINE,
        LFUN_INSERT_PAGEBREAK,
        LFUN_REPEAT,
        LFUN_FINISHED_LEFT,
-       // 250
        LFUN_FINISHED_RIGHT,
+       // 250
        LFUN_FINISHED_UP,
        LFUN_FINISHED_DOWN,
        LFUN_INSERT_CHARSTYLE,
        LFUN_WORD_FIND,
-       // 255
        LFUN_WORD_REPLACE,
+       // 255
 
        LFUN_LASTACTION                  // end of the table
 };
index 63cda7cf37d6f123811d4eeeaa5666d7204a770d..7f45fa4a337a9c31be56e76d523d1f3afd0646f3 100644 (file)
@@ -518,7 +518,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
                if (!buf) {
                        disable = !(name == "aboutlyx" ||
                                    name == "file" ||
-                                   name == "forks" ||
                                    name == "preferences" ||
                                    name == "texinfo");
                        break;
@@ -1143,8 +1142,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
                        }
                        else if (name == "document")
                                owner->getDialogs().showDocument();
-                       else if (name == "forks")
-                               owner->getDialogs().showForks();
                        else if (name == "preamble")
                                owner->getDialogs().showPreamble();
                        else if (name == "preferences")
@@ -1372,11 +1369,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
                        owner->message(argument);
                        break;
 
-               case LFUN_FORKS_KILL:
-                       if (isStrInt(argument))
-                               ForkedcallsController::get().kill(strToInt(argument));
-                       break;
-
                case LFUN_TOOLTIPS_TOGGLE:
                        owner->getDialogs().toggleTooltips();
                        break;