Get rid of Application::initGlobalMenu().

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24896 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-23 08:57:41 +00:00
parent f45523aa7a
commit 6186965651
4 changed files with 6 additions and 19 deletions

View 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;
}

View 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

View 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_)

View 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;