From f8d5ab3dacdbdaecbf6d6eafbd10499287b90011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 25 Jan 2025 13:12:42 +0100 Subject: [PATCH] [pgp] Port to new confirmation dialog --- pgp/plugin.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pgp/plugin.py b/pgp/plugin.py index 416e055..fae6d97 100644 --- a/pgp/plugin.py +++ b/pgp/plugin.py @@ -25,7 +25,7 @@ from gajim.common import ged from gajim.plugins import GajimPlugin from gajim.plugins.plugins_i18n import _ -from gajim.gtk.dialogs import ErrorDialog +from gajim.gtk.dialogs import SimpleDialog from gajim.gtk.dialogs import DialogButton from gajim.gtk.dialogs import ConfirmationCheckDialog @@ -137,7 +137,6 @@ class PGPPlugin(GajimPlugin): @staticmethod def _on_not_trusted(event): ConfirmationCheckDialog( - _('Untrusted PGP key'), _('Untrusted PGP key'), _('The PGP key used to encrypt this chat is not ' 'trusted. Do you really want to encrypt this ' @@ -159,7 +158,7 @@ class PGPPlugin(GajimPlugin): try: valid = client.get_module('PGPLegacy').has_valid_key_assigned(jid) except KeyMismatch as announced_key_id: - ErrorDialog( + SimpleDialog( _('PGP Key mismatch'), _('The contact\'s key (%s) does not match the key ' 'assigned in Gajim.') % announced_key_id) @@ -167,12 +166,12 @@ class PGPPlugin(GajimPlugin): return if not valid: - ErrorDialog( + SimpleDialog( _('No OpenPGP key assigned'), _('No OpenPGP key is assigned to this contact.')) chat_control.sendmessage = False elif client.get_module('PGPLegacy').get_own_key_data() is None: - ErrorDialog( + SimpleDialog( _('No OpenPGP key assigned'), _('No OpenPGP key is assigned to your account.')) chat_control.sendmessage = False @@ -186,4 +185,4 @@ class PGPPlugin(GajimPlugin): @staticmethod def _on_file_encryption_error(event): - ErrorDialog(_('Error'), event.error) + SimpleDialog(_('Error'), event.error)