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