* \author Lars Gullik Bjønnes
* \author John Levon
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
#include "LyXView.h"
+#include "Dialogs.h"
+#include "Timeout.h"
+#include "Toolbar.h"
+#include "Menubar.h"
+
+#include "buffer.h"
+#include "BufferView.h"
+#include "bufferview_funcs.h"
#include "debug.h"
+#include "funcrequest.h"
+#include "gettext.h"
#include "intl.h"
+#include "lyx_cb.h"
+#include "lyxfunc.h"
#include "lyxrc.h"
#include "lyxtext.h"
-#include "buffer.h"
#include "MenuBackend.h"
-#include "gettext.h"
-#include "lyxfunc.h"
-#include "funcrequest.h"
-#include "lyx_cb.h"
-#include "BufferView.h"
-#include "bufferview_funcs.h"
-#include "Dialogs.h"
-#include "Toolbar.h"
-#include "Timeout.h"
-#include "Menubar.h"
#include "controllers/ControlCommandBuffer.h"
+#include "mathed/math_cursor.h"
+
#include "support/filetools.h" // OnlyFilename()
#include <boost/bind.hpp>
#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);
}