aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gpgfrontend.qrc1
-rw-r--r--resource/lfs/icons/publish.pngbin0 -> 10642 bytes
-rw-r--r--src/ui/dialog/keypair_details/KeyPairDetailTab.cpp11
-rw-r--r--src/ui/dialog/settings/SettingsNetwork.cpp22
-rw-r--r--ui/NetworkSettings.ui10
5 files changed, 26 insertions, 18 deletions
diff --git a/gpgfrontend.qrc b/gpgfrontend.qrc
index 08071cd5..b4269ebd 100644
--- a/gpgfrontend.qrc
+++ b/gpgfrontend.qrc
@@ -102,6 +102,7 @@
<file alias="add.png">resource/lfs/icons/add.png</file>
<file alias="minus.png">resource/lfs/icons/minus.png</file>
<file alias="database.png">resource/lfs/icons/database.png</file>
+ <file alias="publish.png">resource/lfs/icons/publish.png</file>
</qresource>
<qresource prefix="/test/key">
<file alias="pv1.key">resource/lfs/test/data/pv1.key</file>
diff --git a/resource/lfs/icons/publish.png b/resource/lfs/icons/publish.png
new file mode 100644
index 00000000..18b63be5
--- /dev/null
+++ b/resource/lfs/icons/publish.png
Binary files differ
diff --git a/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp b/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp
index 820e9963..33b699b5 100644
--- a/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp
+++ b/src/ui/dialog/keypair_details/KeyPairDetailTab.cpp
@@ -310,7 +310,14 @@ void KeyPairDetailTab::slot_query_key_publish_state() {
.GetSettings()
.value("network/forbid_all_gnupg_connection")
.toBool();
- if (forbid_all_gnupg_connection) return;
+
+ bool auto_fetch_key_publish_status =
+ GlobalSettingStation::GetInstance()
+ .GetSettings()
+ .value("network/auto_fetch_key_publish_status")
+ .toBool();
+
+ if (forbid_all_gnupg_connection || !auto_fetch_key_publish_status) return;
if (!Module::IsModuleActivate(
"com.bktus.gpgfrontend.module.key_server_sync")) {
@@ -344,7 +351,7 @@ void KeyPairDetailTab::slot_query_key_publish_state() {
if (!key_data.isEmpty()) {
slot_refresh_notice(
- ":/icons/sent.png",
+ ":/icons/publish.png",
tr("Notice: The key has been published on "
"keys.openpgp.org."));
}
diff --git a/src/ui/dialog/settings/SettingsNetwork.cpp b/src/ui/dialog/settings/SettingsNetwork.cpp
index b270b10c..8a95c177 100644
--- a/src/ui/dialog/settings/SettingsNetwork.cpp
+++ b/src/ui/dialog/settings/SettingsNetwork.cpp
@@ -46,7 +46,7 @@ GpgFrontend::UI::NetworkTab::NetworkTab(QWidget *parent)
});
connect(
- ui_->autoImportMissingKeyCheckBox, &QCheckBox::stateChanged, this,
+ ui_->autoFetchKeyPublishStatusCheckBox, &QCheckBox::stateChanged, this,
[=](int state) {
ui_->forbidALLGnuPGNetworkConnectionCheckBox->setCheckState(
state == Qt::Checked
@@ -56,10 +56,10 @@ GpgFrontend::UI::NetworkTab::NetworkTab(QWidget *parent)
connect(ui_->forbidALLGnuPGNetworkConnectionCheckBox,
&QCheckBox::stateChanged, this, [=](int state) {
- ui_->autoImportMissingKeyCheckBox->setCheckState(
+ ui_->autoFetchKeyPublishStatusCheckBox->setCheckState(
state == Qt::Checked
? Qt::Unchecked
- : ui_->autoImportMissingKeyCheckBox->checkState());
+ : ui_->autoFetchKeyPublishStatusCheckBox->checkState());
});
connect(
@@ -92,8 +92,8 @@ GpgFrontend::UI::NetworkTab::NetworkTab(QWidget *parent)
ui_->prohibitUpdateCheck->setText(
tr("Prohibit checking for version updates when the program starts."));
}
- ui_->autoImportMissingKeyCheckBox->setText(
- tr("Automatically import a missing key for signature verification."));
+ ui_->autoFetchKeyPublishStatusCheckBox->setText(
+ tr("Automatically fetch key publish status from key server."));
ui_->networkAbilityTipsLabel->setText(
tr("Tips: These Option Changes take effect only after the "
"application restart."));
@@ -136,10 +136,10 @@ void GpgFrontend::UI::NetworkTab::SetSettings() {
ui_->prohibitUpdateCheck->setCheckState(
prohibit_update_checking ? Qt::Checked : Qt::Unchecked);
- auto auto_import_missing_key =
- settings.value("network/auto_import_missing_key", true).toBool();
- ui_->autoImportMissingKeyCheckBox->setCheckState(
- auto_import_missing_key ? Qt::Checked : Qt::Unchecked);
+ auto auto_fetch_key_publish_status =
+ settings.value("network/auto_fetch_key_publish_status", false).toBool();
+ ui_->autoFetchKeyPublishStatusCheckBox->setCheckState(
+ auto_fetch_key_publish_status ? Qt::Checked : Qt::Unchecked);
switch_ui_proxy_type(ui_->proxyTypeComboBox->currentText());
switch_ui_enabled(ui_->enableProxyCheckBox->isChecked());
@@ -160,8 +160,8 @@ void GpgFrontend::UI::NetworkTab::ApplySettings() {
ui_->forbidALLGnuPGNetworkConnectionCheckBox->isChecked());
settings.setValue("network/prohibit_update_checking",
ui_->prohibitUpdateCheck->isChecked());
- settings.setValue("network/auto_import_missing_key",
- ui_->autoImportMissingKeyCheckBox->isChecked());
+ settings.setValue("network/auto_fetch_key_publish_status",
+ ui_->autoFetchKeyPublishStatusCheckBox->isChecked());
apply_proxy_settings();
}
diff --git a/ui/NetworkSettings.ui b/ui/NetworkSettings.ui
index 8d7c7d48..481bb498 100644
--- a/ui/NetworkSettings.ui
+++ b/ui/NetworkSettings.ui
@@ -254,7 +254,7 @@
<item>
<widget class="Line" name="line_2">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
@@ -313,9 +313,9 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="autoImportMissingKeyCheckBox">
+ <widget class="QCheckBox" name="autoFetchKeyPublishStatusCheckBox">
<property name="text">
- <string>Automatically import a missing key for signature verification.</string>
+ <string>Automatically fetch key publish status from key server.</string>
</property>
</widget>
</item>
@@ -324,7 +324,7 @@
<item row="3" column="0">
<widget class="Line" name="line">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
@@ -334,7 +334,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>