mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
Rob's beauty treatment to the LyX minimise icon.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5271 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b7c25c8a80
commit
928befac58
@ -1,3 +1,8 @@
|
||||
2002-09-11 Rob Lahaye <lahaye@snu.ac.kr>
|
||||
|
||||
* LyXView.C (LyXView::updateWindowTitle): change the minimised icon
|
||||
to show an asterix if the buffer has changed.
|
||||
|
||||
2002-09-11 John Levon <levon@movementarian.org>
|
||||
|
||||
* Painter.C: draw frame after background. This is needed
|
||||
|
@ -152,25 +152,26 @@ void LyXView::updateLayoutChoice()
|
||||
void LyXView::updateWindowTitle()
|
||||
{
|
||||
static string last_title = "LyX";
|
||||
string title = "LyX";
|
||||
string icon_title = "LyX";
|
||||
string maximize_title = "LyX";
|
||||
string minimize_title = "LyX";
|
||||
|
||||
if (view()->available()) {
|
||||
string const cur_title = buffer()->fileName();
|
||||
if (!cur_title.empty()) {
|
||||
title += ": " + MakeDisplayPath(cur_title, 30);
|
||||
if (!buffer()->isClean())
|
||||
title += _(" (changed)");
|
||||
maximize_title += ": " + MakeDisplayPath(cur_title, 30);
|
||||
minimize_title = OnlyFilename(cur_title);
|
||||
if (!buffer()->isClean()) {
|
||||
maximize_title += _(" (changed)");
|
||||
minimize_title += "*";
|
||||
}
|
||||
if (buffer()->isReadonly())
|
||||
title += _(" (read only)");
|
||||
// Show only the filename if it's available
|
||||
icon_title = OnlyFilename(cur_title);
|
||||
maximize_title += _(" (read only)");
|
||||
}
|
||||
}
|
||||
|
||||
if (title != last_title) {
|
||||
setWindowTitle(title, icon_title);
|
||||
last_title = title;
|
||||
if (maximize_title != last_title) {
|
||||
setWindowTitle(maximize_title, minimize_title);
|
||||
last_title = maximize_title;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user