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
This commit is contained in:
Richard Heck 2008-08-11 12:57:02 +00:00
parent 4af444926a
commit 8c6ba1dd6c
2 changed files with 10 additions and 2 deletions

View 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*/)
{

View File

@ -150,6 +150,8 @@ public Q_SLOTS:
private Q_SLOTS:
///
void updateWindowTitle(GuiWorkArea * wa);
///
void resetWindowTitleAndIconText();
///
void on_currentWorkAreaChanged(GuiWorkArea *);