mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
* lyx_gui: create_view(), start() and exit() functions deleted.
* 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
This commit is contained in:
parent
69d72462b6
commit
85d2e4b917
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user