Indicate read-only state in window title.

This commit is contained in:
Florian Geyer 2012-05-28 18:38:33 +02:00
parent 5201001f3a
commit 8aefb1ed82
3 changed files with 32 additions and 1 deletions

View file

@ -225,7 +225,11 @@ void MainWindow::updateWindowTitle()
setWindowTitle(BaseWindowTitle);
}
else {
setWindowTitle(m_ui->tabWidget->tabText(index).append(" - ").append(BaseWindowTitle));
QString windowTitle = m_ui->tabWidget->tabText(index);
if (m_ui->tabWidget->readOnly(index)) {
windowTitle.append(" [").append(tr("read-only")).append("]");
}
setWindowTitle(windowTitle.append(" - ").append(BaseWindowTitle));
}
}