]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlFloat.C
Move the external dialog to the new scheme.
[lyx.git] / src / frontends / controllers / ControlFloat.C
index fd700ae35cb3ae45f8519406bf4bc405ff7cb1dc..24fe4acdc16f26194063a62bff29716f59cb22f1 100644 (file)
@@ -1,49 +1,32 @@
-/* This file is part of
- * ====================================================== 
+/**
+ * \file ControlFloat.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
- *
- *           Copyright 2001 The LyX Team.
- *
- * ======================================================
+ * \author unknown
  *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
 #include "ControlFloat.h"
-#include "ControlInset.tmpl"
-#include "Dialogs.h"
-#include "LyXView.h"
-#include "buffer.h"
 #include "BufferView.h"
-#include "insets/insetfloat.h"
-
-using std::vector;
-using SigC::slot;
+#include "buffer.h"
 
 
 ControlFloat::ControlFloat(LyXView & lv, Dialogs & d)
        : ControlInset<InsetFloat, FloatParams>(lv, d)
-{
-       d_.showFloat.connect(slot(this, &ControlFloat::showInset));
-
-       // We could have an extra method updateInset that calls
-       // view().update() rather than view().show(), but I don't see why
-       // it is really needed.
-       //d_.updateFloat.connect(slot(this, &ControlFloat::showInset));
-}
+{}
 
 
 void ControlFloat::applyParamsToInset()
 {
        inset()->placement(params().placement);
+       inset()->wide(params().wide, bufferview()->buffer()->params);
+       bufferview()->updateInset(inset(), true);
+
 }
 
 
@@ -59,11 +42,11 @@ FloatParams const ControlFloat::getParams(InsetFloat const & inset)
 
 FloatParams::FloatParams()
        : placement("htbp"),
-         allow_here_definitely(true)
+         wide(false)
 {}
 
 
 FloatParams::FloatParams(InsetFloat const & inset)
-       : placement(inset.placement()), 
-         allow_here_definitely(!inset.wide())
+       : placement(inset.placement()),
+         wide(inset.wide())
 {}