[pgp] Replace YesNoDialog
This commit is contained in:
@@ -27,7 +27,8 @@ from gajim.plugins import GajimPlugin
|
|||||||
from gajim.plugins.plugins_i18n import _
|
from gajim.plugins.plugins_i18n import _
|
||||||
|
|
||||||
from gajim.gtk.dialogs import ErrorDialog
|
from gajim.gtk.dialogs import ErrorDialog
|
||||||
from gajim.gtk.dialogs import YesNoDialog
|
from gajim.gtk.dialogs import DialogButton
|
||||||
|
from gajim.gtk.dialogs import NewConfirmationCheckDialog
|
||||||
|
|
||||||
from pgp.gtk.key import KeyDialog
|
from pgp.gtk.key import KeyDialog
|
||||||
from pgp.gtk.config import PGPConfigDialog
|
from pgp.gtk.config import PGPConfigDialog
|
||||||
@@ -134,14 +135,19 @@ class PGPPlugin(GajimPlugin):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _on_not_trusted(event):
|
def _on_not_trusted(event):
|
||||||
YesNoDialog(
|
NewConfirmationCheckDialog(
|
||||||
|
_('Untrusted PGP key'),
|
||||||
_('Untrusted PGP key'),
|
_('Untrusted PGP key'),
|
||||||
_('The PGP key used to encrypt this chat is not '
|
_('The PGP key used to encrypt this chat is not '
|
||||||
'trusted. Do you really want to encrypt this '
|
'trusted. Do you really want to encrypt this '
|
||||||
'message?'),
|
'message?'),
|
||||||
checktext=_('_Do not ask me again'),
|
_('_Do not ask me again'),
|
||||||
on_response_yes=event.on_yes,
|
[DialogButton.make('Cancel',
|
||||||
on_response_no=event.on_no)
|
text=_('_No'),
|
||||||
|
callback=event.on_no),
|
||||||
|
DialogButton.make('OK',
|
||||||
|
text=_('_Encrypt Anyway'),
|
||||||
|
callback=event.on_yes)]).show()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _before_sendmessage(chat_control):
|
def _before_sendmessage(chat_control):
|
||||||
|
|||||||
Reference in New Issue
Block a user