From f3a0435e423fe240a3254e2815905babc961dcd4 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 10 Jul 2003 14:39:38 +0000 Subject: [PATCH] special menu hack for qt/mac git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7263 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 5 +++++ src/frontends/qt2/Menubar_pimpl.C | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 88d0673eda..1f35ca7735 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2003-07-10 Jean-Marc Lasgouttes + + * Menubar_pimpl.C (Pimpl): when creating a top-level menu, make + sure that it is initialized to some reasonable value, so that the + (ugly) Qt/Mac code can do its magic (conditionally on Q_WS_MAC). 2003-07-11 André Pönitz diff --git a/src/frontends/qt2/Menubar_pimpl.C b/src/frontends/qt2/Menubar_pimpl.C index 517a4bdb51..5a5ee63689 100644 --- a/src/frontends/qt2/Menubar_pimpl.C +++ b/src/frontends/qt2/Menubar_pimpl.C @@ -48,6 +48,17 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe) pair menu = createMenu(owner_->menuBar(), &(*m), this, true); name_map_[m->submenuname()] = menu.second; +#ifdef Q_WS_MAC + /* The qt/mac menu code has a very silly hack that + moves some menu entries that it recognizes by name + (ex: "Preferences...") to the "LyX" menu. This + feature can only work if the menu entries are + always available. Since we build menus on demand, + we have to have a reasonable default value before + the menus have been explicitely opened. (JMarc) + */ + menu.second->showing(); +#endif } }