mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +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>
|
2002-09-11 John Levon <levon@movementarian.org>
|
||||||
|
|
||||||
* Painter.C: draw frame after background. This is needed
|
* Painter.C: draw frame after background. This is needed
|
||||||
|
@ -152,25 +152,26 @@ void LyXView::updateLayoutChoice()
|
|||||||
void LyXView::updateWindowTitle()
|
void LyXView::updateWindowTitle()
|
||||||
{
|
{
|
||||||
static string last_title = "LyX";
|
static string last_title = "LyX";
|
||||||
string title = "LyX";
|
string maximize_title = "LyX";
|
||||||
string icon_title = "LyX";
|
string minimize_title = "LyX";
|
||||||
|
|
||||||
if (view()->available()) {
|
if (view()->available()) {
|
||||||
string const cur_title = buffer()->fileName();
|
string const cur_title = buffer()->fileName();
|
||||||
if (!cur_title.empty()) {
|
if (!cur_title.empty()) {
|
||||||
title += ": " + MakeDisplayPath(cur_title, 30);
|
maximize_title += ": " + MakeDisplayPath(cur_title, 30);
|
||||||
if (!buffer()->isClean())
|
minimize_title = OnlyFilename(cur_title);
|
||||||
title += _(" (changed)");
|
if (!buffer()->isClean()) {
|
||||||
|
maximize_title += _(" (changed)");
|
||||||
|
minimize_title += "*";
|
||||||
|
}
|
||||||
if (buffer()->isReadonly())
|
if (buffer()->isReadonly())
|
||||||
title += _(" (read only)");
|
maximize_title += _(" (read only)");
|
||||||
// Show only the filename if it's available
|
|
||||||
icon_title = OnlyFilename(cur_title);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (title != last_title) {
|
if (maximize_title != last_title) {
|
||||||
setWindowTitle(title, icon_title);
|
setWindowTitle(maximize_title, minimize_title);
|
||||||
last_title = title;
|
last_title = maximize_title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user