]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlInset.tmpl
Nothing but a changed email address (trying to factor my tree in in small steps)
[lyx.git] / src / frontends / controllers / ControlInset.tmpl
index fe88747c366ad931b4f019034ecc1abbe42d8010..a25ec96529fbc8f3c013c64790f482b9e2b4b7d3 100644 (file)
@@ -4,20 +4,16 @@
  * Copyright 2002 the LyX Team
  * Read the file COPYING
  *
- * \author Angus Leeming <a.leeming@ic.ac.uk>
+ * \author Angus Leeming <leeming@lyx.org>
  *
  * ControlInset is a base class and so these templatised methods will be
  * instantiated if this file is #included in the derived classes' .C file.
  */
 
 #include "ControlInset.h"
+
 #include "ButtonControllerBase.h"
 #include "ViewBase.h"
-#include "buffer.h"
-#include "debug.h"
-#include "frontends/LyXView.h"
-#include "insets/insetfloat.h"
-#include "insets/insetgraphics.h"
 #include "support/LAssert.h"
 
 #include <boost/bind.hpp>
@@ -70,7 +66,7 @@ void ControlInset<Inset, Params>::show(Params const & params)
                dialog_built_ = true;
        }
 
-       bc().readOnly(isReadonly());
+       bc().readOnly(bufferIsReadonly());
        view().show();
 }
 
@@ -91,7 +87,7 @@ void ControlInset<Inset, Params>::update()
                return;
        }
 
-       bc().readOnly(isReadonly());
+       bc().readOnly(bufferIsReadonly());
        view().update();
 }
 
@@ -117,7 +113,7 @@ void ControlInset<Inset, Params>::hide()
 template <class Inset, class Params>
 void ControlInset<Inset, Params>::apply()
 {
-       if (lv_.buffer()->isReadonly())
+       if (bufferIsReadonly())
                return;
 
        view().apply();