diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-12 06:48:51 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-12 10:21:16 -0700 |
commit | ef95bd9a2784db7468df01bebf0166f73179e7a4 (patch) | |
tree | 5be3eec97240e182a4e199c996b3493fc5cdaf68 /qt-ui/mainwindow.cpp | |
parent | 57f2c81125f45b1f07122ad9c0295a6c76a5e4fe (diff) | |
download | subsurface-ef95bd9a2784db7468df01bebf0166f73179e7a4.tar.gz |
Indicate that there are unsaved changes with a '*' in the window title
This seems to be a fairly common way to indicate this property.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 80f9fc9f1..571eb15f1 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1429,7 +1429,8 @@ void MainWindow::setTitle(enum MainWindowTitleFormat format) QFile f(existing_filename); QFileInfo fileInfo(f); QString fileName(fileInfo.fileName()); - setWindowTitle("Subsurface: " + fileName); + QString unsaved = (unsaved_changes() ? " *" : ""); + setWindowTitle("Subsurface: " + fileName + unsaved); break; } } |