Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Mielniczuk <marmistrzmar@gmail.com>2023-07-04 20:28:53 +0300
committerPhilipp Hörist <philipp@hoerist.com>2023-07-04 20:28:53 +0300
commit0cc9b18f0d3b0621c85da8a237f099690283b4fb (patch)
tree8ea9321de28a07b4fec9e21101a08ebf71117af5
parent2293f439f7b26dc8414313360cb1ea2bc5952b85 (diff)
feat: Add setting for default encryption
-rw-r--r--gajim/common/setting_values.py3
-rw-r--r--gajim/gtk/accounts.py15
2 files changed, 17 insertions, 1 deletions
diff --git a/gajim/common/setting_values.py b/gajim/common/setting_values.py
index d91856e3a..d4ff0022f 100644
--- a/gajim/common/setting_values.py
+++ b/gajim/common/setting_values.py
@@ -436,6 +436,7 @@ ACCOUNT_SETTINGS = {
'default_workspace': '',
'enable_gssapi': False,
'enable_security_labels': False,
+ 'encryption_default': '',
'file_transfer_proxies': '',
'filetransfer_preference': 'httpupload',
'ft_send_local_ips': True,
@@ -480,7 +481,7 @@ ACCOUNT_SETTINGS = {
},
'contact': {
- 'encryption': '',
+ 'encryption': HAS_ACCOUNT_DEFAULT,
'mute_until': '',
'send_chatstate': HAS_ACCOUNT_DEFAULT,
'send_marker': HAS_ACCOUNT_DEFAULT,
diff --git a/gajim/gtk/accounts.py b/gajim/gtk/accounts.py
index 6ee9d9a0a..759b728e9 100644
--- a/gajim/gtk/accounts.py
+++ b/gajim/gtk/accounts.py
@@ -783,7 +783,22 @@ class PrivacyPage(GenericSettingPage):
'disabled': _('Disabled'),
}
+ encryption_entries = {
+ '': _('Unencrypted'),
+ 'OMEMO': 'OMEMO',
+ 'OpenPGP': 'OpenPGP',
+ 'PGP': 'PGP',
+ }
+
settings = [
+ Setting(SettingKind.POPOVER,
+ _('Default Encryption'),
+ SettingType.ACCOUNT_CONFIG,
+ 'encryption_default',
+ desc=_('Encryption method to use '
+ 'unless overridden on a per-contact basis'),
+ props={'entries': encryption_entries}),
+
Setting(SettingKind.SWITCH,
_('Idle Time'),
SettingType.ACCOUNT_CONFIG,