X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2FLyXView.C;h=f49bdeeed1b542862f4c9b9dd170c07704233c97;hb=d6cb58ab663a42b3a8b04e3a3ac40f9e4074ae12;hp=d805fee37175cec6c713a1110dd7bc6ae9d9a885;hpb=53274e31ec1cc715c0b48921ee67818790c2e99a;p=lyx.git diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index d805fee371..f49bdeeed1 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -6,35 +6,34 @@ * \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 -#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 @@ -42,8 +41,10 @@ #include #include +using namespace lyx::support; using std::endl; + string current_layout; @@ -52,7 +53,7 @@ LyXView::LyXView() 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; } @@ -99,7 +100,10 @@ void LyXView::setLayout(string const & layout) void LyXView::updateToolbar() { - toolbar_->update(); + bool const math = mathcursor; + bool const table = + !getLyXFunc().getStatus(LFUN_LAYOUT_TABULAR).disabled(); + toolbar_->update(math, table); }