From: Abdelrazak Younes Date: Thu, 23 Aug 2007 12:54:35 +0000 (+0000) Subject: delete unneeded Menubar virtual interface. X-Git-Tag: 1.6.10~8735 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8381d36098fb9244c15dba6b93cf509996c9c02e;p=features.git delete unneeded Menubar virtual interface. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19751 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index b9384260d1..45d3913909 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -84,9 +84,7 @@ #include "frontends/Gui.h" #include "frontends/KeySymbol.h" #include "frontends/LyXView.h" -#include "frontends/Menubar.h" #include "frontends/Selection.h" -#include "frontends/Toolbars.h" #include "frontends/WorkArea.h" #include "support/environment.h" diff --git a/src/frontends/LyXView.cpp b/src/frontends/LyXView.cpp index 5247c3f77d..c0be8e9f34 100644 --- a/src/frontends/LyXView.cpp +++ b/src/frontends/LyXView.cpp @@ -15,7 +15,6 @@ #include "Dialogs.h" #include "Toolbars.h" -#include "Menubar.h" #include "WorkArea.h" #include "Gui.h" diff --git a/src/frontends/Makefile.am b/src/frontends/Makefile.am index 30260859f8..0c421b49fa 100644 --- a/src/frontends/Makefile.am +++ b/src/frontends/Makefile.am @@ -28,7 +28,6 @@ liblyxfrontends_la_SOURCES = \ KeySymbol.h \ LyXView.cpp \ LyXView.h \ - Menubar.h \ Painter.cpp \ Painter.h \ Toolbars.cpp \ diff --git a/src/frontends/Menubar.h b/src/frontends/Menubar.h deleted file mode 100644 index 929beea908..0000000000 --- a/src/frontends/Menubar.h +++ /dev/null @@ -1,39 +0,0 @@ -// -*- C++ -*- -/** - * \file Menubar.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author Lars Gullik Bjønnes - * \author Jean-Marc Lasgouttes - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef MENUBAR_H -#define MENUBAR_H - -#include "support/docstring.h" - - -namespace lyx { -namespace frontend { - -/** - * The LyX GUI independent menubar class - * The GUI interface is implemented in the frontends - */ -class Menubar { -public: - /// - virtual ~Menubar() {} - /// Opens a top-level submenu given its name - virtual void openByName(docstring const &) = 0; - /// update the state of the menuitems - virtual void update() = 0; -}; - -} // namespace frontend -} // namespace lyx - -#endif // MENUBAR_H diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 36af40fa7c..473814870f 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -309,8 +309,6 @@ QMenu* GuiView::createPopupMenu() void GuiView::init() { d.menubar_ = new QLMenubar(this, menubackend); - QObject::connect(menuBar(), SIGNAL(triggered(QAction *)), - this, SLOT(updateMenu(QAction *))); toolbars_->init(); @@ -561,12 +559,6 @@ void GuiView::setGeometry(unsigned int width, } -void GuiView::updateMenu(QAction * /*action*/) -{ - d.menubar_->update(); -} - - void GuiView::setWindowTitle(docstring const & t, docstring const & it) { QString title = windowTitle(); diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h index 5eb2e32f68..e4ab76331d 100644 --- a/src/frontends/qt4/GuiView.h +++ b/src/frontends/qt4/GuiView.h @@ -92,9 +92,6 @@ public Q_SLOTS: /// idle timeout void update_view_state_qt(); - /// populate a toplevel menu and all its children on demand - void updateMenu(QAction *); - void currentTabChanged(int index); void closeCurrentTab(); diff --git a/src/frontends/qt4/QLMenubar.cpp b/src/frontends/qt4/QLMenubar.cpp index 177679f73c..aba834f26d 100644 --- a/src/frontends/qt4/QLMenubar.cpp +++ b/src/frontends/qt4/QLMenubar.cpp @@ -111,9 +111,6 @@ void QLMenubar::openByName(docstring const & name) } -void QLMenubar::update() -{ } - GuiView * QLMenubar::view() { return owner_; diff --git a/src/frontends/qt4/QLMenubar.h b/src/frontends/qt4/QLMenubar.h index 9f94c944db..0f044142ef 100644 --- a/src/frontends/qt4/QLMenubar.h +++ b/src/frontends/qt4/QLMenubar.h @@ -13,8 +13,6 @@ #ifndef QLMENUBAR_H #define QLMENUBAR_H -#include "frontends/Menubar.h" - #include "QLPopupMenu.h" #include @@ -34,7 +32,7 @@ namespace frontend { class GuiView; class LyXView; -class QLMenubar : public QObject, public Menubar { +class QLMenubar : public QObject { Q_OBJECT public: QLMenubar(LyXView *, MenuBackend &); @@ -54,10 +52,6 @@ public: /// update the state of the menuitems - not needed void update(); -public Q_SLOTS: - /// populate a toplevel menu and all its children on demand -// void updateMenu(); - private: /// Initialize specific MACOS X menubar void macxMenuBarInit();