diff --git a/src/frontends/lyx_gui.C b/src/frontends/lyx_gui.C index 41296e61f4..dffd02bec5 100644 --- a/src/frontends/lyx_gui.C +++ b/src/frontends/lyx_gui.C @@ -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; diff --git a/src/frontends/lyx_gui.h b/src/frontends/lyx_gui.h index 5469aee8ad..6cf6dc5fbe 100644 --- a/src/frontends/lyx_gui.h +++ b/src/frontends/lyx_gui.h @@ -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 diff --git a/src/frontends/qt4/GuiView.C b/src/frontends/qt4/GuiView.C index cb6ad4b34c..14f9a1bfd8 100644 --- a/src/frontends/qt4/GuiView.C +++ b/src/frontends/qt4/GuiView.C @@ -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 diff --git a/src/lyx_cb.C b/src/lyx_cb.C index bc806950d8..455136b3df 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -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(); } diff --git a/src/lyx_main.C b/src/lyx_main.C index 6485af0939..18e7453ff5 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -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);