void LyX::restoreGuiSession()
{
// create the main window
- pimpl_->application_->createView(geometryArg);
+ pimpl_->lyxfunc_.dispatch(FuncRequest(LFUN_WINDOW_NEW, geometryArg));
// if there is no valid class list, do not load any file.
if (textclasslist.empty())
* @param fd socket descriptor (file/socket/etc)
*/
virtual void unregisterSocketCallback(int fd) = 0;
-
- /// Create the main window with given geometry settings.
- /// \param geometry_arg: only for Windows platform.
- virtual void createView(std::string const & geometry_arg = std::string()) = 0;
};
} // namespace frontend
switch(cmd.action) {
case LFUN_WINDOW_NEW:
- createView();
+ createView(toqstr(cmd.argument()));
break;
case LFUN_WINDOW_CLOSE:
}
-void GuiApplication::createView(string const & geometry_arg)
+void GuiApplication::createView(QString const & geometry_arg)
{
updateIds(views_, view_ids_);
int id = 0;
theLyXFunc().setLyXView(view);
view->show();
- if (!geometry_arg.empty()) {
+ if (!geometry_arg.isEmpty()) {
#ifdef Q_WS_WIN
int x, y;
int w, h;
QRegExp re( "[=]*(?:([0-9]+)[xX]([0-9]+)){0,1}[ ]*(?:([+-][0-9]*)([+-][0-9]*)){0,1}" );
- re.indexIn(toqstr(geometry_arg.c_str()));
+ re.indexIn(geometry_arg);
w = re.cap(1).toInt();
h = re.cap(2).toInt();
x = re.cap(3).toInt();
virtual void updateColor(ColorCode col);
virtual void registerSocketCallback(int fd, SocketCallback func);
void unregisterSocketCallback(int fd);
- void createView(std::string const & geometry_arg = std::string());
//@}
/// Methods inherited from \c QApplication class
void commitData(QSessionManager & sm);
//@}
+ /// Create the main window with given geometry settings.
+ /// \param geometry_arg: only for Windows platform.
+ void createView(QString const & geometry_arg);
///
GuiView const * currentView() const { return current_view_; }
///