aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/controller/GnuPGControllerDialog.cpp
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/ui/dialog/controller/GnuPGControllerDialog.cpp
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/ui/dialog/controller/GnuPGControllerDialog.cpp')
-rw-r--r--src/ui/dialog/controller/GnuPGControllerDialog.cpp18
1 files changed, 1 insertions, 17 deletions
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());