]> git.lyx.org Git - features.git/commitdiff
Patch from Vincent. This resets the window title appropriately, after
authorRichard Heck <rgheck@comcast.net>
Mon, 11 Aug 2008 12:57:02 +0000 (12:57 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 11 Aug 2008 12:57:02 +0000 (12:57 +0000)
the last BufferView has been closed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26115 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h

index 694c8daedf17cf2e5462b051afaa0e545529c951..5a43273b81d824ca9d53e9b83aae169a6b3c7a49 100644 (file)
@@ -689,6 +689,8 @@ void GuiView::on_lastWorkAreaRemoved()
        updateDialog("document", "");
        updateDialogs();
 
+       resetWindowTitleAndIconText();
+
        if (lyxrc.open_buffers_in_tabs)
                // Nothing more to do, the window should stay open.
                return;
@@ -761,8 +763,7 @@ bool GuiView::event(QEvent * e)
                        updateDialog("document", "");
                        updateDialogs();
                } else {
-                       setWindowTitle(qt_("LyX"));
-                       setWindowIconText(qt_("LyX"));
+                       resetWindowTitleAndIconText();
                }
                setFocus();
                return QMainWindow::event(e);
@@ -810,6 +811,11 @@ bool GuiView::event(QEvent * e)
        }
 }
 
+void GuiView::resetWindowTitleAndIconText()
+{
+    setWindowTitle(qt_("LyX"));
+    setWindowIconText(qt_("LyX"));
+}
 
 bool GuiView::focusNextPrevChild(bool /*next*/)
 {
index 232b63b23cca131757c33ca41c5c952936d0d9d3..c89f56de2b9d7bca490a59a6c9a0d0ca69c872ff 100644 (file)
@@ -150,6 +150,8 @@ public Q_SLOTS:
 private Q_SLOTS:
        ///
        void updateWindowTitle(GuiWorkArea * wa);
+       ///
+       void resetWindowTitleAndIconText();
 
        ///
        void on_currentWorkAreaChanged(GuiWorkArea *);