From 0f464081971569d9ec6f621cfecdb39a5b8ee2b9 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 2 Jan 2022 15:07:19 +0800 Subject: (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. --- src/ui/MainWindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ui/MainWindow.cpp') 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"; } -- cgit v1.2.3