]> git.lyx.org Git - features.git/commitdiff
Get rid of Application::initGlobalMenu().
authorAbdelrazak Younes <younes@lyx.org>
Fri, 23 May 2008 08:57:41 +0000 (08:57 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 23 May 2008 08:57:41 +0000 (08:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24896 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyX.cpp
src/frontends/Application.h
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiApplication.h

index fc335f4eb0df9ac487142d9db20aed3c00983c90..d7a205db6d771657be2c8dc13507d42a03351a8d 100644 (file)
@@ -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;
 }
 
index 28a64a48d6df2fa4a110a827a174c39cb518fc28..9f77000907213b2c27594af0bf759a83fa4cca82 100644 (file)
@@ -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
index ed44a153d709131d9b368a541379420b56b5a40f..df3039e36c88690db4b36c856feea09df25d8a81 100644 (file)
@@ -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_)
index 288679c1d7cf7fe21c4976347121115a96bcf355..def7dcfe248d1e6d61fb0ef1442feec95631db8e 100644 (file)
@@ -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<docstring> & names) const;