]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormInset.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormInset.C
index 34a1cb71571a0e2f98aec3d58e074010dbed9bbe..086758351ab1da24c61c13ae4667970c8ffb05f2 100644 (file)
@@ -1,9 +1,11 @@
 /**
  * \file FormInset.C
- * Copyright 2000-2001 The LyX Team.
- * See 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
  */
 
 #include <config.h>
 #pragma implementation
 #endif
 
-#include "Dialogs.h"
-#include "frontends/LyXView.h"
 #include "FormInset.h"
-#include "xformsBC.h"
 
-using SigC::slot;
+#include "frontends/Dialogs.h"
+
+#include <boost/bind.hpp>
 
-FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t)
-       : FormBaseBD(lv, d, t), ih_(0)
+FormInset::FormInset(LyXView & lv, Dialogs & d, string const & t)
+       : FormBaseBD(lv, d, t)
 {}
 
 
 void FormInset::connect()
 {
-       u_ = d_->updateBufferDependent.
-               connect(slot(this, &FormInset::updateSlot));
-       h_ = d_->hideBufferDependent.
-               connect(slot(this, &FormInset::hide));
+       u_ = d_.updateBufferDependent.
+               connect(boost::bind(&FormInset::updateSlot, this, _1));
+       h_ = d_.hideBufferDependent.
+               connect(boost::bind(&FormInset::hide, this));
        FormBaseDeprecated::connect();
 }
 
@@ -50,46 +51,3 @@ void FormInset::updateSlot(bool switched)
        else
                update();
 }
-
-
-FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t)
-       : FormInset(lv, d, t),
-         inset_(0)
-{}
-
-
-void FormCommand::disconnect()
-{
-       inset_ = 0;
-       params = InsetCommandParams(string());
-       FormInset::disconnect();
-}
-
-
-void FormCommand::showInset(InsetCommand * inset)
-{
-       if (inset == 0) return;  // maybe we should Assert this?
-
-       // If connected to another inset, disconnect from it.
-       if (inset_)
-               ih_.disconnect();
-
-       inset_    = inset;
-       params    = inset->params();
-       ih_ = inset->hideDialog.connect(slot(this, &FormCommand::hide));
-       show();
-}
-
-
-void FormCommand::createInset(string const & arg)
-{
-       if (inset_) {
-               ih_.disconnect();
-               inset_ = 0;
-       }
-
-       params.setFromString(arg);
-       if ( !arg.empty())
-               bc().valid(); // so that the user can press Ok
-       show();
-}