]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlLog.C
John's character.C patch (bug fix).
[lyx.git] / src / frontends / controllers / ControlLog.C
index 5e0a7a41e886ca569f24ff3de7538d86644a92ff..2c9c570de676efebbeec7974f162203cf6f09da3 100644 (file)
  * \author Angus Leeming <a.leeming@ic.ac.uk>
  */
 
+#include <config.h>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include <config.h>
+#include "ViewBase.h"
+#include "ButtonControllerBase.h"
 #include "ControlLog.h"
 #include "LyXView.h"
 #include "Dialogs.h"
 #include "lyxrc.h"
+#include "BufferView.h"
 
-using std::make_pair;
 using SigC::slot;
 
 ControlLog::ControlLog(LyXView & lv, Dialogs & d)
-       : ControlConnectBD(lv, d)
+       : ControlDialog<ControlConnectBD>(lv, d)
 {
        d_.showLogFile.connect(slot(this, &ControlLog::show));
 }
 
 
-void ControlLog::show()
+void ControlLog::setParams()
 {
-       if (!lv_.view()->available())
-               return;
-
-       logfile_ = lv_.view()->buffer()->getLogName();
-
-       bc().readOnly(isReadonly());
-       view().show();
-}
-
-
-void ControlLog::update()
-{
-       if (!lv_.view()->available())
-               return;
-
        logfile_ = lv_.view()->buffer()->getLogName();
-       
-       bc().readOnly(isReadonly());
-       view().update();
 }
 
 
-void ControlLog::hide()
+void ControlLog::clearParams()
 {
        logfile_.second.erase();
-       disconnect();
-       view().hide();
 }