Commit bfa19585 authored by Yuki's avatar Yuki

Add config setting to disable image-paste confirmation dialogs

parent 21efad7a
Pipeline #3502 failed with stages
......@@ -589,6 +589,9 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
image = clipboard.wait_for_image()
if image is not None:
if not app.config.get('confirm_paste_image'):
self._paste_event_confirmed(image, textview)
return
ConfirmationDialog(_('You are trying to paste an image'),
_('Are you sure you want to paste your '
'clipboard image in the chat?'),
......
......@@ -185,6 +185,7 @@ class Config:
'remote_control': [opt_bool, False, _('If checked, Gajim can be controlled remotely using gajim-remote.'), True],
'autodetect_browser_mailer': [opt_bool, True, '', True],
'print_ichat_every_foo_minutes': [opt_int, 5, _('When not printing time for every message (print_time==sometimes), print it every x minutes.')],
'confirm_paste_image': [opt_bool, True, _('Ask before pasting an image.')],
'confirm_close_muc': [opt_bool, True, _('Ask before closing a group chat tab/window.')],
'confirm_close_muc_rooms': [opt_str, '', _('Always ask for confirmation before closing groupchats with any of the JIDs on this space separated list.')],
'noconfirm_close_muc_rooms': [opt_str, '', _('Never ask for confirmation before closing groupchats with any of the JIDs on this space separated list.')],
......
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