* Licence details can be found in the file COPYING.
*
* \author Lars Gullik Bjønnes
- * \author John Levon
+ * \author John Levon
*
* Full author contact details are available in file CREDITS
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
#include "LyXView.h"
#include "debug.h"
#include "intl.h"
#include "Timeout.h"
#include "Menubar.h"
#include "controllers/ControlCommandBuffer.h"
+#include "mathed/math_cursor.h"
#include "support/filetools.h" // OnlyFilename()
#include <sys/time.h>
#include <unistd.h>
+using namespace lyx::support;
using std::endl;
string current_layout;
autosave_timeout_(new Timeout(5000)),
lyxfunc_(new LyXFunc(this)),
dialogs_(new Dialogs(*this)),
- controlcommand_(new ControlCommandBuffer(getLyXFunc()))
+ controlcommand_(new ControlCommandBuffer(*this))
{
lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl;
}
void LyXView::updateToolbar()
{
- toolbar_->update();
+ bool const math = mathcursor;
+ bool const table =
+ !getLyXFunc().getStatus(LFUN_LAYOUT_TABULAR).disabled();
+ toolbar_->update(math, table);
}
minimize_title = OnlyFilename(cur_title);
if (!buffer()->isClean()) {
maximize_title += _(" (changed)");
- minimize_title += "*";
+ minimize_title += '*';
}
if (buffer()->isReadonly())
maximize_title += _(" (read only)");
// substitute the correct BufferView here
FuncRequest r = req;
r.setView(view().get());
- getLyXFunc().dispatch(r);
+ getLyXFunc().dispatch(r);
}