diff --git a/src/LyX.cpp b/src/LyX.cpp index fc335f4eb0..d7a205db6d 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -866,12 +866,7 @@ bool LyX::init() // This must happen after package initialization and after lyxrc is // read, therefore it can't be done by a static object. ConverterCache::init(); - - // init the global menubar on Mac. This must be done after the session - // was recovered to know the "last files". - if (use_gui) - theApp()->initGlobalMenu(); - + return true; } diff --git a/src/frontends/Application.h b/src/frontends/Application.h index 28a64a48d6..9f77000907 100644 --- a/src/frontends/Application.h +++ b/src/frontends/Application.h @@ -218,11 +218,6 @@ public: * read and create the menu structure */ virtual void readMenus(Lexer & lex) = 0; - - /** - * initialize the global menubar on Mac - */ - virtual void initGlobalMenu() = 0; /** * add a callback for socket read notification diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index ed44a153d7..df3039e36c 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -724,6 +724,11 @@ void GuiApplication::exit(int status) void GuiApplication::execBatchCommands() { + // init the global menubar on Mac. This must be done after the session + // was recovered to know the "last files". + if (d->global_menubar_) + d->menus_.fillMenuBar(d->global_menubar_, 0, true); + LyX::ref().execBatchCommands(); } @@ -1032,13 +1037,6 @@ bool GuiApplication::searchMenu(FuncRequest const & func, } -void GuiApplication::initGlobalMenu() -{ - if (d->global_menubar_) - menus().fillMenuBar(d->global_menubar_, 0, true); -} - - void GuiApplication::onLastWindowClosed() { if (d->global_menubar_) diff --git a/src/frontends/qt4/GuiApplication.h b/src/frontends/qt4/GuiApplication.h index 288679c1d7..def7dcfe24 100644 --- a/src/frontends/qt4/GuiApplication.h +++ b/src/frontends/qt4/GuiApplication.h @@ -67,7 +67,6 @@ public: std::string const hexName(ColorCode col); void updateColor(ColorCode col); void readMenus(Lexer & lex); - void initGlobalMenu(); void registerSocketCallback(int fd, SocketCallback func); void unregisterSocketCallback(int fd); bool searchMenu(FuncRequest const & func, std::vector & names) const;