]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlForks.C
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlForks.C
index 4ffbfb82bcc972bf0970bd9419d7fa68b0975c2a..6f71ddf8b7a8157c575174a5c6979048d16952a8 100644 (file)
@@ -1,63 +1,57 @@
 /**
  * \file ControlForks.C
- * Copyright 2001 The LyX Team
- * Read COPYING
+ * 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>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "ControlForks.h"
-#include "ButtonControllerBase.h"
 #include "ViewBase.h"
 
-#include "BufferView.h"
-#include "LyXView.h"
 #include "lyxfunc.h"
-
-#include "frontends/Dialogs.h"
+#include "funcrequest.h"
 
 #include "support/forkedcontr.h"
-#include "support/lstrings.h"
+#include "support/tostr.h"
+
+#include <boost/bind.hpp>
+
+using namespace lyx::support;
 
 using std::vector;
-using SigC::slot;
+
 
 ControlForks::ControlForks(LyXView & lv, Dialogs & d)
        : ControlDialogBI(lv, d)
-{
-       d_.showForks.connect(slot(this, &ControlForks::show));
-}
+{}
 
 
 vector<pid_t> const ControlForks::getPIDs() const
 {
-       ForkedcallsController const & fcc = ForkedcallsController::get();
-       return fcc.getPIDs();
+       return ForkedcallsController::get().getPIDs();
 }
 
 
 string const ControlForks::getCommand(pid_t pid) const
 {
-       ForkedcallsController const & fcc = ForkedcallsController::get();
-       return fcc.getCommand(pid);
+       return ForkedcallsController::get().getCommand(pid);
 }
 
 
 void ControlForks::kill(pid_t pid)
 {
-       pids_.push_back(tostr(pid));
+       pids_.push_back(pid);
 }
 
 
 void ControlForks::apply()
 {
-       if (!lv_.view()->available())
+       if (!bufferIsAvailable())
                return;
 
        view().apply();
@@ -66,9 +60,9 @@ void ControlForks::apply()
        if (pids_.empty())
                return;
 
-       for (vector<string>::const_iterator it = pids_.begin();
+       for (vector<pid_t>::const_iterator it = pids_.begin();
             it != pids_.end(); ++it) {
-               lv_.getLyXFunc()->dispatch(LFUN_FORKS_KILL, *it);
+               lyxfunc().dispatch(FuncRequest(LFUN_FORKS_KILL, tostr(*it)));
        }
 
        pids_.clear();
@@ -84,7 +78,7 @@ void ControlForks::setParams()
 
        ForkedcallsController & fcc = ForkedcallsController::get();
        childrenChanged_ =
-               fcc.childrenChanged.connect(slot(this, &ControlForks::update));
+               fcc.childrenChanged.connect(boost::bind(&ControlForks::update, this));
 }