]> git.lyx.org Git - features.git/commitdiff
special menu hack for qt/mac
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 10 Jul 2003 14:39:38 +0000 (14:39 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 10 Jul 2003 14:39:38 +0000 (14:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7263 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/Menubar_pimpl.C

index 88d0673eda913d2dd40faecd8a0419b90b2e042d..1f35ca7735b06a748cee0f41ff602e3308599653 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-10  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
+
+       * 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  <poenitz@lyx.org>
 
index 517a4bdb516982dc9dea79f4d2cbeb5f4dd3a789..5a5ee63689b7d2bbe8f5bd7094d97097e7011335 100644 (file)
@@ -48,6 +48,17 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe)
                pair<int, QLPopupMenu *> 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
        }
 }