]> git.lyx.org Git - features.git/commitdiff
make Application slimmer
authorAndré Pönitz <poenitz@gmx.net>
Sat, 17 Nov 2007 22:37:33 +0000 (22:37 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sat, 17 Nov 2007 22:37:33 +0000 (22:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21659 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/Application.h
src/frontends/qt4/GuiView.cpp

index 985137304f63dcba4480bd7f02ec406a80548d5e..30f05c2c65628b1b81c3acca2733fb04a340f411 100644 (file)
@@ -151,10 +151,6 @@ public:
        ///
        virtual ~Application() {}
 
-       ///
-       virtual int createRegisteredView() = 0;
-       ///
-       virtual bool unregisterView(int id) = 0;
        ///
        virtual bool closeAllViews() = 0;
 
index a11c0acac0679191803d303334b90e40e63aa18e..5f3b2d7eae62df08bcc7fcfe9ee1079fdcc46d68 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "GuiView.h"
 
+#include "GuiApplication.h"
 #include "GuiWorkArea.h"
 #include "GuiKeySymbol.h"
 #include "GuiMenubar.h"
@@ -24,7 +25,6 @@
 
 #include "qt_helpers.h"
 
-#include "frontends/Application.h"
 #include "frontends/Dialogs.h"
 
 #include "support/filetools.h"
@@ -403,7 +403,7 @@ void GuiView::closeEvent(QCloseEvent * close_event)
 {
        // we may have been called through the close window button
        // which bypasses the LFUN machinery.
-       if (!quitting_by_menu_ && theApp()->viewCount() == 1) {
+       if (!quitting_by_menu_ && guiApp->viewCount() == 1) {
                if (!theBufferList().quitWriteAll()) {
                        close_event->ignore();
                        return;
@@ -428,8 +428,8 @@ void GuiView::closeEvent(QCloseEvent * close_event)
                d.toolbars_->saveToolbarInfo();
        }
 
-       theApp()->unregisterView(id());
-       if (theApp()->viewCount() > 0) {
+       guiApp->unregisterView(id());
+       if (guiApp->viewCount() > 0) {
                // Just close the window and do nothing else if this is not the
                // last window.
                close_event->accept();
@@ -575,7 +575,7 @@ bool GuiView::event(QEvent * e)
        //      break;
 
        case QEvent::WindowActivate: {
-               theApp()->setCurrentView(*this);
+               guiApp->setCurrentView(*this);
                if (d.current_work_area_) {
                        BufferView & bv = d.current_work_area_->bufferView();
                        connectBufferView(bv);