mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-29 19:06:55 -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
|
|
@ -27,6 +27,7 @@
|
|||
#include "core/Global.h"
|
||||
#include "core/Resources.h"
|
||||
#include "core/Translator.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/osutils/OSUtils.h"
|
||||
|
||||
#include "MessageBox.h"
|
||||
|
|
@ -324,7 +325,15 @@ void ApplicationSettingsWidget::saveSettings()
|
|||
config()->set(Config::AutoTypeEntryURLMatch, m_generalUi->autoTypeEntryURLMatchCheckBox->isChecked());
|
||||
config()->set(Config::FaviconDownloadTimeout, m_generalUi->faviconTimeoutSpinBox->value());
|
||||
|
||||
config()->set(Config::GUI_Language, m_generalUi->languageComboBox->currentData().toString());
|
||||
auto language = m_generalUi->languageComboBox->currentData().toString();
|
||||
if (config()->get(Config::GUI_Language) != language) {
|
||||
QTimer::singleShot(200, [] {
|
||||
getMainWindow()->restartApp(
|
||||
tr("You must restart the application to set the new language. Would you like to restart now?"));
|
||||
});
|
||||
}
|
||||
config()->set(Config::GUI_Language, language);
|
||||
|
||||
config()->set(Config::GUI_MovableToolbar, m_generalUi->toolbarMovableCheckBox->isChecked());
|
||||
config()->set(Config::GUI_MonospaceNotes, m_generalUi->monospaceNotesCheckBox->isChecked());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue