X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiApplication.cpp;h=69e5f09a28b06979f2409e807f456a75494e25bd;hb=4e223167ff2872ee123c8354d486352c8a368102;hp=b3ba440f41beaea0864fbe553f20d1e3322b0f84;hpb=d63821939cccea8a57418412de06eb3f96efb58e;p=lyx.git diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index b3ba440f41..69e5f09a28 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -161,9 +161,9 @@ GuiApplication::GuiApplication(int & argc, char ** argv) QCoreApplication::setOrganizationDomain("lyx.org"); QCoreApplication::setApplicationName(app_name + "-" + lyx_version); - //FIXME: quitOnLastWindowClosed is true by default, at least on Windows and - // X11 platforms. We should have a lyxrc setting for this in order to let the - // application stay resident. + // FIXME: quitOnLastWindowClosed is true by default. We should have a + // lyxrc setting for this in order to let the application stay resident. + // But then we need some kind of dock icon, at least on Windows. /* if (lyxrc.quit_on_last_window_closed) setQuitOnLastWindowClosed(false); @@ -318,14 +318,14 @@ bool GuiApplication::dispatch(FuncRequest const & cmd) case LFUN_BUFFER_NEW: if (viewCount() == 0 - || (!lyxrc.single_window && current_view_->buffer() != 0)) + || (!lyxrc.open_buffers_in_tabs && current_view_->buffer() != 0)) createView(); current_view_->newDocument(to_utf8(cmd.argument()), false); break; case LFUN_BUFFER_NEW_TEMPLATE: if (viewCount() == 0 - || (!lyxrc.single_window && current_view_->buffer() != 0)) { + || (!lyxrc.open_buffers_in_tabs && current_view_->buffer() != 0)) { createView(); current_view_->newDocument(to_utf8(cmd.argument()), true); if (!current_view_->buffer()) @@ -336,7 +336,7 @@ bool GuiApplication::dispatch(FuncRequest const & cmd) case LFUN_FILE_OPEN: if (viewCount() == 0 - || (!lyxrc.single_window && current_view_->buffer() != 0)) { + || (!lyxrc.open_buffers_in_tabs && current_view_->buffer() != 0)) { createView(); current_view_->openDocument(to_utf8(cmd.argument())); if (!current_view_->buffer()) @@ -376,6 +376,9 @@ static void updateIds(map const & stdmap, vector & ids) void GuiApplication::createView(QString const & geometry_arg) { + if (global_menubar_) + global_menubar_->releaseKeyboard(); + // create new view updateIds(views_, view_ids_); int id = 0; @@ -390,8 +393,7 @@ void GuiApplication::createView(QString const & geometry_arg) // register view views_[id] = view; updateIds(views_, view_ids_); - - theLyXFunc().setLyXView(view); + view->show(); if (!geometry_arg.isEmpty()) { #ifdef Q_WS_WIN