aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-18 20:45:44 +0000
committersaturneric <[email protected]>2025-04-18 20:45:44 +0000
commit4ce13836ceb858ede5f0d31f40ebcd7b45b39fcb (patch)
tree4d4cdd137b0ed6b6ec1cfa28bbf3107c21b612fd /src
parentfix: gpgconf path should firstly be initialized at gpg context (diff)
downloadGpgFrontend-4ce13836ceb858ede5f0d31f40ebcd7b45b39fcb.tar.gz
GpgFrontend-4ce13836ceb858ede5f0d31f40ebcd7b45b39fcb.zip
chore: restart gpg-agent at start and kill gpg agent by close as default behaviors
Diffstat (limited to 'src')
-rw-r--r--src/core/GpgCoreInit.cpp1
-rw-r--r--src/init.cpp2
-rw-r--r--src/ui/dialog/controller/GnuPGControllerDialog.cpp18
3 files changed, 2 insertions, 19 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp
index b15a6800..b13a96a0 100644
--- a/src/core/GpgCoreInit.cpp
+++ b/src/core/GpgCoreInit.cpp
@@ -33,7 +33,6 @@
#include "core/function/GlobalSettingStation.h"
#include "core/function/basic/ChannelObject.h"
#include "core/function/basic/SingletonStorage.h"
-#include "core/function/gpg/GpgAdvancedOperator.h"
#include "core/function/gpg/GpgContext.h"
#include "core/function/gpg/GpgKeyGetter.h"
#include "core/module/ModuleManager.h"
diff --git a/src/init.cpp b/src/init.cpp
index 312198a7..f0481152 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -180,7 +180,7 @@ void ShutdownGlobalBasicEnv(const GFCxtWPtr &p_ctx) {
auto kill_all_gnupg_daemon_at_close =
GetSettings()
- .value("gnupg/kill_all_gnupg_daemon_at_close", false)
+ .value("gnupg/kill_all_gnupg_daemon_at_close", true)
.toBool();
if (ctx->unit_test_mode || kill_all_gnupg_daemon_at_close) {
diff --git a/src/ui/dialog/controller/GnuPGControllerDialog.cpp b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
index 3f21b57b..7a515002 100644
--- a/src/ui/dialog/controller/GnuPGControllerDialog.cpp
+++ b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
@@ -54,8 +54,6 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent)
ui_->gpgmeDebugLogCheckBox->setText(tr("Enable GpgME Debug Log"));
ui_->useCustomGnuPGInstallPathCheckBox->setText(tr("Use Custom GnuPG"));
ui_->useCustomGnuPGInstallPathButton->setText(tr("Select GnuPG Path"));
- ui_->restartGpgAgentOnStartCheckBox->setText(
- tr("Restart Gpg Agent on start"));
ui_->killAllGnuPGDaemonCheckBox->setText(
tr("Kill all gnupg daemon at close"));
@@ -133,12 +131,6 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent)
this->slot_set_restart_needed(kDeepRestartCode);
});
- connect(ui_->restartGpgAgentOnStartCheckBox, &QCheckBox::stateChanged, this,
- [=](int) {
- // announce the restart
- this->slot_set_restart_needed(kDeepRestartCode);
- });
-
connect(ui_->useCustomGnuPGInstallPathCheckBox, &QCheckBox::stateChanged,
this, [=](int) {
// announce the restart
@@ -242,7 +234,7 @@ void GnuPGControllerDialog::set_settings() {
}
auto kill_all_gnupg_daemon_at_close =
- settings.value("gnupg/kill_all_gnupg_daemon_at_close", false).toBool();
+ settings.value("gnupg/kill_all_gnupg_daemon_at_close", true).toBool();
if (kill_all_gnupg_daemon_at_close) {
ui_->killAllGnuPGDaemonCheckBox->setCheckState(Qt::Checked);
}
@@ -262,12 +254,6 @@ void GnuPGControllerDialog::set_settings() {
ui_->usePinentryAsPasswordInputDialogCheckBox->setCheckState(Qt::Checked);
}
- auto restart_gpg_agent_on_start =
- settings.value("gnupg/restart_gpg_agent_on_start", false).toBool();
- if (restart_gpg_agent_on_start) {
- ui_->restartGpgAgentOnStartCheckBox->setCheckState(Qt::Checked);
- }
-
this->slot_update_custom_gnupg_install_path_label(
use_custom_gnupg_install_path ? Qt::Checked : Qt::Unchecked);
@@ -292,8 +278,6 @@ void GnuPGControllerDialog::apply_settings() {
ui_->gpgmeDebugLogCheckBox->isChecked());
settings.setValue("gnupg/custom_gnupg_install_path",
ui_->currentCustomGnuPGInstallPathLabel->text());
- settings.setValue("gnupg/restart_gpg_agent_on_start",
- ui_->restartGpgAgentOnStartCheckBox->isChecked());
settings.setValue("gnupg/kill_all_gnupg_daemon_at_close",
ui_->killAllGnuPGDaemonCheckBox->isChecked());