ACE option to trun off having the Esc key close a control. Vi users do this by habit,
and it sucks losing a well thought out message.
This commit is contained in:
parent
f529f0364a
commit
40211a41c7
|
@ -188,6 +188,7 @@ class Config:
|
||||||
'one_message_window': [opt_str, 'always',
|
'one_message_window': [opt_str, 'always',
|
||||||
_('Controls the window where new messages are placed.\n\'always\' - All messages are sent to a single window.\n\'never\' - All messages get their own window.\n\'peracct\' - Messages for each account are sent to a specific window.\n\'pertype\' - Each message type (e.g., chats vs. groupchats) are sent to a specific window. Note, changing this option requires restarting Gajim before the changes will take effect')],
|
_('Controls the window where new messages are placed.\n\'always\' - All messages are sent to a single window.\n\'never\' - All messages get their own window.\n\'peracct\' - Messages for each account are sent to a specific window.\n\'pertype\' - Each message type (e.g., chats vs. groupchats) are sent to a specific window. Note, changing this option requires restarting Gajim before the changes will take effect')],
|
||||||
'show_avatar_in_chat': [opt_bool, True, _('If False, you will no longer see the avatar in the chat window')],
|
'show_avatar_in_chat': [opt_bool, True, _('If False, you will no longer see the avatar in the chat window')],
|
||||||
|
'escape_key_closes': [opt_bool, True, _('If True, pressing the escape key closes a tab/window')],
|
||||||
}
|
}
|
||||||
|
|
||||||
__options_per_key = {
|
__options_per_key = {
|
||||||
|
|
|
@ -472,7 +472,8 @@ class MessageWindow:
|
||||||
elif event.keyval == gtk.keysyms.c: # ALT + C toggles compact view
|
elif event.keyval == gtk.keysyms.c: # ALT + C toggles compact view
|
||||||
ctrl.set_compact_view(not ctrl.compact_view_current)
|
ctrl.set_compact_view(not ctrl.compact_view_current)
|
||||||
# Close tab bindings
|
# Close tab bindings
|
||||||
elif event.keyval == gtk.keysyms.Escape: # ESCAPE
|
elif event.keyval == gtk.keysyms.Escape and \
|
||||||
|
gajim.config.get('escape_key_closes'): # Escape
|
||||||
self.remove_tab(ctrl)
|
self.remove_tab(ctrl)
|
||||||
else:
|
else:
|
||||||
# If the active control has a message_textview pass the event to it
|
# If the active control has a message_textview pass the event to it
|
||||||
|
|
Loading…
Reference in New Issue