mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-18 09:52:46 -05:00
Improve restart requests
* Fixes #4959 * Ask to restart when changing languages in application settings.
This commit is contained in:
parent
2fe74c2947
commit
4a917d171d
2 changed files with 19 additions and 7 deletions
|
|
@ -1679,17 +1679,20 @@ void MainWindow::initViewMenu()
|
|||
}
|
||||
}
|
||||
|
||||
connect(themeActions, &QActionGroup::triggered, this, [this](QAction* action) {
|
||||
if (action->data() != config()->get(Config::GUI_ApplicationTheme)) {
|
||||
config()->set(Config::GUI_ApplicationTheme, action->data());
|
||||
connect(themeActions, &QActionGroup::triggered, this, [this, theme](QAction* action) {
|
||||
config()->set(Config::GUI_ApplicationTheme, action->data());
|
||||
if (action->data() != theme) {
|
||||
restartApp(tr("You must restart the application to apply this setting. Would you like to restart now?"));
|
||||
}
|
||||
});
|
||||
|
||||
m_ui->actionCompactMode->setChecked(config()->get(Config::GUI_CompactMode).toBool());
|
||||
connect(m_ui->actionCompactMode, &QAction::toggled, this, [this](bool checked) {
|
||||
bool compact = config()->get(Config::GUI_CompactMode).toBool();
|
||||
m_ui->actionCompactMode->setChecked(compact);
|
||||
connect(m_ui->actionCompactMode, &QAction::toggled, this, [this, compact](bool checked) {
|
||||
config()->set(Config::GUI_CompactMode, checked);
|
||||
restartApp(tr("You must restart the application to apply this setting. Would you like to restart now?"));
|
||||
if (checked != compact) {
|
||||
restartApp(tr("You must restart the application to apply this setting. Would you like to restart now?"));
|
||||
}
|
||||
});
|
||||
|
||||
m_ui->actionShowToolbar->setChecked(!config()->get(Config::GUI_HideToolbar).toBool());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue