1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
11 * \author John Levon, moz@compsoc.man.ac.uk
12 * \author Angus Leeming <a.leeming@ic.ac.uk>
16 #pragma implementation
20 #include "ButtonController.h"
21 #include "ControlLog.h"
30 ControlLog::ControlLog(LyXView & lv, Dialogs & d)
31 : ControlConnectBD(lv, d)
33 d_.showLogFile.connect(slot(this, &ControlLog::show));
37 void ControlLog::show()
39 if (!lv_.view()->available())
42 logfile_ = lv_.view()->buffer()->getLogName();
44 bc().readOnly(isReadonly());
49 void ControlLog::update()
51 if (!lv_.view()->available())
54 logfile_ = lv_.view()->buffer()->getLogName();
56 bc().readOnly(isReadonly());
61 void ControlLog::hide()
63 logfile_.second.erase();