]> git.lyx.org Git - lyx.git/commitdiff
* lyx_gui: create_view(), start() and exit() functions deleted.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 3 Oct 2006 13:38:28 +0000 (13:38 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 3 Oct 2006 13:38:28 +0000 (13:38 +0000)
* lyx_main.C and lyx_cb.C: use Application methods directly instead of the above functions.

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

src/frontends/lyx_gui.C
src/frontends/lyx_gui.h
src/frontends/qt4/GuiView.C
src/lyx_cb.C
src/lyx_main.C

index 41296e61f4e21b977744e1d283a511901c0aeb16..dffd02bec5d2e91ed3ad713fd393ac22215cf6a2 100644 (file)
@@ -13,7 +13,6 @@
 
 #include "lyx_gui.h"
 
-#include "LyXView.h"
 #include "Application.h"
 
 #include "funcrequest.h"
@@ -31,25 +30,6 @@ void parse_lyxrc()
 {}
 
 
-LyXView * create_view(unsigned int width, unsigned int height, int posx, int posy,
-          bool maximize)
-{
-       return &theApp->createView(width, height, posx, posy, maximize);
-}
-
-
-int start(LyXView * view, string const & batch)
-{
-       return theApp->start(batch);
-}
-
-
-void exit(int status)
-{
-       theApp->exit(status);
-}
-
-
 FuncStatus getStatus(FuncRequest const & ev)
 {
        FuncStatus flag;
index 5469aee8adecf7a147169cdd517f83add6f66007..6cf6dc5fbe298ea1a3fe8db014b2c8c2e37751d7 100644 (file)
@@ -51,18 +51,6 @@ std::string const typewriter_font_name();
  */
 void parse_lyxrc();
 
-/**
- * Create the main window with given geometry settings
- */
-LyXView * create_view(unsigned int width, unsigned int height, int posx, int posy,
-             bool maximize);
-
-/**
- * Start the main event loop, after executing the given
- * batch commands
- */
-int start(LyXView* view, std::string const & batch);
-
 /**
  * Enter the main event loop (\sa LyX::exec2)
  */
@@ -73,12 +61,6 @@ int exec(int & argc, char * argv[]);
  */
 void sync_events();
 
-/**
- * Quit running LyX. This may either quit directly or record the exit status
- * and only stop the event loop.
- */
-void exit(int);
-
 /**
  * return the status flag for a given action. This can be used to tell
  * that a given lfun is not implemented by a frontend
index cb6ad4b34c1cf8a715c83f089c138c90a532c685..14f9a1bfd82657cabdda4a65969eba2e2dc5016b 100644 (file)
@@ -235,7 +235,7 @@ void GuiView::closeEvent(QCloseEvent *)
        // http://www.trolltech.com/developer/task-tracker/index_html?id=119684+&method=entry
        // Then also the moveEvent, resizeEvent, and the
        // code for floatingGeometry_ can be removed;
-       // adjust lyx_gui::start
+       // adjust GuiView::setGeometry()
 #ifdef Q_OS_WIN32
        QRect geometry = normalGeometry();
 #else
index bc806950d88389249c3db859efcac059bd7803be..455136b3dfeda597a1ccb7049eb50d26f98a946d 100644 (file)
@@ -216,7 +216,7 @@ void quitLyX(bool noask)
                Alert::warning(_("Unable to remove temporary directory"), msg);
        }
 
-       lyx_gui::exit(0);
+       theApp->exit(0);
        // Restore original font resources after Application is destroyed.
        lyx::support::restoreFontResources();
 }
index 6485af0939631ebb8e0ee299180a41030084a9f4..18e7453ff59822ca544788440489110e0e74565c 100644 (file)
@@ -109,8 +109,7 @@ void lyx_exit(int status)
        // guarantees a return to the system, no application cleanup.
        // This may cause troubles with not executed destructors.
        if (lyx_gui::use_gui) {
-               // lyx_gui::exit may return and only schedule the exit
-               lyx_gui::exit(status);
+               theApp->exit(status);
                // Restore original font resources after Application is destroyed.
                lyx::support::restoreFontResources();
        }
@@ -345,7 +344,7 @@ int LyX::exec2(int & argc, char * argv[])
                        height = 0;
                }
                // create the main window
-               LyXView * view = lyx_gui::create_view(width, height, posx, posy, maximize);
+               LyXView * view = &theApp->createView(width, height, posx, posy, maximize);
                ref().addLyXView(view);
 
                // load files
@@ -364,7 +363,7 @@ int LyX::exec2(int & argc, char * argv[])
                // clear this list to save a few bytes of RAM
                session_->clearLastOpenedFiles();
 
-               return lyx_gui::start(view, batch_command);
+               return theApp->start(batch_command);
        } else {
                // Something went wrong above
                quitLyX(false);