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>
This commit is contained in:
Dirk Hohndel 2015-06-12 06:48:51 -07:00
parent 57f2c81125
commit ef95bd9a27
5 changed files with 12 additions and 2 deletions

View file

@ -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;
}
}