mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-05 01:15:33 -05:00
Merge pull request #420 from weslly/feature/window-modified-indicator
Set window modified indicator when database has unsaved changes
This commit is contained in:
commit
93dcf8231f
@ -543,6 +543,15 @@ bool DatabaseTabWidget::readOnly(int index)
|
||||
return indexDatabaseManagerStruct(index).readOnly;
|
||||
}
|
||||
|
||||
bool DatabaseTabWidget::isModified(int index)
|
||||
{
|
||||
if (index == -1) {
|
||||
index = currentIndex();
|
||||
}
|
||||
|
||||
return indexDatabaseManagerStruct(index).modified;
|
||||
}
|
||||
|
||||
void DatabaseTabWidget::updateTabName(Database* db)
|
||||
{
|
||||
int index = databaseIndex(db);
|
||||
|
@ -78,6 +78,7 @@ public slots:
|
||||
void changeMasterKey();
|
||||
void changeDatabaseSettings();
|
||||
bool readOnly(int index = -1);
|
||||
bool isModified(int index = -1);
|
||||
void performGlobalAutoType();
|
||||
void lockDatabases();
|
||||
|
||||
|
@ -530,6 +530,8 @@ void MainWindow::updateWindowTitle()
|
||||
windowTitle = QString("%1 - %2").arg(customWindowTitlePart, BaseWindowTitle);
|
||||
}
|
||||
|
||||
setWindowModified(m_ui->tabWidget->isModified(tabWidgetIndex));
|
||||
|
||||
setWindowTitle(windowTitle);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user