From 8c6ba1dd6c63e340bcaa78489cbd874acd6830f6 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 11 Aug 2008 12:57:02 +0000 Subject: [PATCH] Patch from Vincent. This resets the window title appropriately, after 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 | 10 ++++++++-- src/frontends/qt4/GuiView.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 694c8daedf..5a43273b81 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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*/) { diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h index 232b63b23c..c89f56de2b 100644 --- a/src/frontends/qt4/GuiView.h +++ b/src/frontends/qt4/GuiView.h @@ -150,6 +150,8 @@ public Q_SLOTS: private Q_SLOTS: /// void updateWindowTitle(GuiWorkArea * wa); + /// + void resetWindowTitleAndIconText(); /// void on_currentWorkAreaChanged(GuiWorkArea *);