Commit 5ac4646c authored by Yuki's avatar Yuki

Use NewConfirmationDialog for the image paste dialog

parent c3d31640
Pipeline #3505 failed with stages
in 3 minutes and 14 seconds
......@@ -53,7 +53,6 @@ from gajim.message_control import MessageControl
from gajim.conversation_textview import ConversationTextview
from gajim.message_textview import MessageTextView
from gajim.gtk.dialogs import ConfirmationDialog
from gajim.gtk.dialogs import NewConfirmationDialog
from gajim.gtk.dialogs import DialogButton
from gajim.gtk import util
......@@ -592,10 +591,15 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
if not app.config.get('confirm_paste_image'):
self._paste_event_confirmed(image, textview)
return
ConfirmationDialog(_('You are trying to paste an image'),
NewConfirmationDialog(
_('Warning'),
_('You are trying to paste an image'),
_('Are you sure you want to paste your '
'clipboard image in the chat?'),
on_response_ok=(self._paste_event_confirmed, image, textview))
'clipboard image in the chat?'),
[DialogButton.make('Cancel'),
DialogButton.make('OK',
callback=lambda: self._paste_event_confirmed(image, textview))],
transient_for=self.parent_win.window).show()
def _paste_event_confirmed(self, image, textview):
with TemporaryDirectory() as dir_:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment