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);
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())
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())
void GuiApplication::createView(QString const & geometry_arg)
{
+ if (global_menubar_)
+ global_menubar_->releaseKeyboard();
+
// create new view
updateIds(views_, view_ids_);
int id = 0;
// register view
views_[id] = view;
updateIds(views_, view_ids_);
-
- theLyXFunc().setLyXView(view);
+
view->show();
if (!geometry_arg.isEmpty()) {
#ifdef Q_WS_WIN