]> git.lyx.org Git - features.git/commitdiff
* GuiMenuBar:
authorAbdelrazak Younes <younes@lyx.org>
Tue, 25 Dec 2007 21:34:53 +0000 (21:34 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 25 Dec 2007 21:34:53 +0000 (21:34 +0000)
- Get rid of unused menuBar() method.
- make sure mac specific code always compile.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22302 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiMenubar.cpp
src/frontends/qt4/GuiMenubar.h
src/frontends/qt4/GuiPopupMenu.cpp

index 5f3ee781643adc0aee2f56ad0d7059582aa1cae2..9926ea0caf0faf3534eb950860943c30f632ff73 100644 (file)
@@ -45,8 +45,10 @@ void GuiMenubar::init()
        // Clear all menubar contents before filling it.
        owner_->menuBar()->clear();
        
+#ifdef Q_WS_MACX
        // setup special mac specific menu item
        macxMenuBarInit();
+#endif
 
        LYXERR(Debug::GUI, "populating menu bar" << to_utf8(menubackend_.getMenubar().name()));
 
@@ -137,22 +139,9 @@ void GuiMenubar::openByName(QString const & name)
   that this menubar will be used also when one of LyX' dialogs has
   focus. (JMarc)
 */
-QMenuBar * GuiMenubar::menuBar() const
-{
-#ifdef Q_WS_MACX
-       return mac_menubar_;
-#else
-       return owner_->menuBar();
-#endif
-}
-
-#ifdef Q_WS_MACX
-extern void qt_mac_set_menubar_merge(bool b);
-#endif
 
 void GuiMenubar::macxMenuBarInit()
 {
-#ifdef Q_WS_MACX
        mac_menubar_ = new QMenuBar;
 
        /* Since Qt 4.2, the qt/mac menu code has special code for
@@ -215,7 +204,6 @@ void GuiMenubar::macxMenuBarInit()
                qMenu->addAction(action);
 
        }
-#endif // Q_WS_MACX
 }
 
 } // namespace frontend
index e4e11312a28661f3ff2c57f15e6d42755a1438b1..545bd762912744ebd83ab389d26dc4020afa9bd9 100644 (file)
@@ -48,9 +48,6 @@ public:
        /// return the menu controller
        MenuBackend const & backend() { return menubackend_; }
 
-       /// The QMenuBar used by LyX
-       QMenuBar * menuBar() const;
-
        /// update the state of the menuitems - not needed
        void updateView();
 
index 6a37dc896f7c2a7226f2a646f4431fe3d0eee6d6..e29a06954dd2aceeb373468e471b49c447f921b8 100644 (file)
 #include "Action.h"
 #include "GuiPopupMenu.h"
 #include "qt_helpers.h"
+
 #include "LyXFunc.h"
 #include "MenuBackend.h"
 
 #include "support/lstrings.h"
 #include "support/debug.h"
 
-#include <QMenuBar>
-
 namespace lyx {
 namespace frontend {