diff --git a/openpgp/gtk/key.py b/openpgp/gtk/key.py index 3362fbf..4be80c4 100644 --- a/openpgp/gtk/key.py +++ b/openpgp/gtk/key.py @@ -25,8 +25,7 @@ from gi.repository import Gtk from nbxmpp import JID from gajim.common import app -from gajim.gtk.dialogs import ConfirmationDialog -from gajim.gtk.dialogs import DialogButton +from gajim.gtk.alert import ConfirmationAlertDialog from gajim.gtk.util.misc import container_remove_all from gajim.gtk.widgets import GajimAppWindow from gajim.plugins.plugins_i18n import _ @@ -143,14 +142,13 @@ class KeyRow(Gtk.ListBoxRow): listbox.remove(self) self.key.delete() - ConfirmationDialog( + ConfirmationAlertDialog( _("Delete Public Key?"), _("This will permanently delete this public key"), - [ - DialogButton.make("Cancel"), - DialogButton.make("Remove", text=_("Delete"), callback=_remove), - ], - ).show() + confirm_label=_("_Delete"), + appearance="destructive", + callback=_remove, + ) def set_trust(self, trust: Trust) -> None: self.key.trust = trust diff --git a/openpgp/pgpplugin.py b/openpgp/pgpplugin.py index 2683487..786a726 100644 --- a/openpgp/pgpplugin.py +++ b/openpgp/pgpplugin.py @@ -36,8 +36,8 @@ from gajim.common.client import Client from gajim.common.const import CSSPriority from gajim.common.events import SignedIn from gajim.common.structs import OutgoingMessage +from gajim.gtk.alert import InformationAlertDialog from gajim.gtk.control import ChatControl -from gajim.gtk.dialogs import SimpleDialog from gajim.plugins import GajimPlugin from gajim.plugins.plugins_i18n import _ @@ -194,7 +194,7 @@ class OpenPGPPlugin(GajimPlugin): keys = openpgp.get_keys(jid) if not keys: - SimpleDialog( + InformationAlertDialog( _("Not Trusted"), _("There was no trusted and active key found") ) chat_control.sendmessage = False