From 9138bb540c6caf2ada9375392f149718a9b172e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 25 Jan 2025 13:11:58 +0100 Subject: [PATCH] [openpgp] Port to new confirmation dialog --- openpgp/gtk/key.py | 5 ++--- openpgp/pgpplugin.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/openpgp/gtk/key.py b/openpgp/gtk/key.py index cad04a9..dbee3f9 100644 --- a/openpgp/gtk/key.py +++ b/openpgp/gtk/key.py @@ -122,14 +122,13 @@ class KeyRow(Gtk.ListBoxRow): self.destroy() ConfirmationDialog( - _('Delete'), - _('Delete Public Key'), + _('Delete Public Key?'), _('This will permanently delete this public key'), [DialogButton.make('Cancel'), DialogButton.make('Remove', text=_('Delete'), callback=_remove)], - transient_for=self.get_toplevel()).show() + ).show() def set_trust(self, trust): icon_name, tooltip, css_class = TRUST_DATA[trust] diff --git a/openpgp/pgpplugin.py b/openpgp/pgpplugin.py index 750ea73..ceb0198 100644 --- a/openpgp/pgpplugin.py +++ b/openpgp/pgpplugin.py @@ -27,7 +27,7 @@ from gajim.common import ged from gajim.common import configpaths from gajim.common.const import CSSPriority -from gajim.gtk.dialogs import ErrorDialog +from gajim.gtk.dialogs import SimpleDialog from gajim.plugins import GajimPlugin from gajim.plugins.plugins_i18n import _ @@ -169,7 +169,7 @@ class OpenPGPPlugin(GajimPlugin): keys = client.get_module('OpenPGP').get_keys(jid) if not keys: - ErrorDialog( + SimpleDialog( _('Not Trusted'), _('There was no trusted and active key found')) chat_control.sendmessage = False