diff options
author | Saturneric <[email protected]> | 2022-01-02 07:07:19 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-01-02 07:07:19 +0000 |
commit | 0f464081971569d9ec6f621cfecdb39a5b8ee2b9 (patch) | |
tree | 74ee8b9e83cb599b8b16cadb72ef9621bfc37814 /src/ui/MainWindow.cpp | |
parent | <refactor, fixed, test>(core, ui): add & modify core and ui (diff) | |
download | GpgFrontend-0f464081971569d9ec6f621cfecdb39a5b8ee2b9.tar.gz GpgFrontend-0f464081971569d9ec6f621cfecdb39a5b8ee2b9.zip |
<feat, refactor, fixed>(core, ui): add & modify file operations
1. add non ascii mode for file operations.
2. the suffix of normalized file encryption.
3. refactor general settings.
Diffstat (limited to 'src/ui/MainWindow.cpp')
-rw-r--r-- | src/ui/MainWindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/MainWindow.cpp b/src/ui/MainWindow.cpp index 8e6b6f81..0411be81 100644 --- a/src/ui/MainWindow.cpp +++ b/src/ui/MainWindow.cpp @@ -274,6 +274,11 @@ void MainWindow::restoreSettings() { general.add("save_key_checked", libconfig::Setting::TypeBoolean) = true; } + if (!general.exists("non_ascii_when_export")) { + general.add("non_ascii_when_export", libconfig::Setting::TypeBoolean) = + true; + } + bool save_key_checked = true; general.lookupValue("save_key_checked", save_key_checked); @@ -293,6 +298,13 @@ void MainWindow::restoreSettings() { } mKeyList->setChecked(key_ids_ptr); } + + auto& smtp = settings["smtp"]; + + if (!smtp.exists("enable")) { + smtp.add("enable", libconfig::Setting::TypeBoolean) = true; + } + } catch (...) { LOG(ERROR) << "cannot resolve settings"; } |