X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyx_main.C;h=18e7453ff59822ca544788440489110e0e74565c;hb=85d2e4b9176e0765a4d30c4e74c7e78e95ea3d6d;hp=6485af0939631ebb8e0ee299180a41030084a9f4;hpb=69d72462b6da2a2b9aa5b9f2811aecd7deeb105d;p=lyx.git 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);