From d7f6b64abee9bb8afb57a858d935d55fb9409ad8 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 26 May 2011 19:39:03 +0200 Subject: [PATCH] Prevent Ctrl+f to open send file dialog if GTK has Emacs-style keybindings enabled. Fixes #6874 --- src/message_window.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/message_window.py b/src/message_window.py index ceaf7ccc3..37eb67b5a 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -355,7 +355,11 @@ class MessageWindow(object): control._on_history_menuitem_activate() elif control.type_id == message_control.TYPE_CHAT and \ keyval == gtk.keysyms.f: # CTRL + f - control._on_send_file_menuitem_activate(None) + # CTRL + f moves cursor one char forward when user uses Emacs + # theme + if not gtk.settings_get_default().get_property( + 'gtk-key-theme-name') == 'Emacs': + control._on_send_file_menuitem_activate(None) elif control.type_id == message_control.TYPE_CHAT and \ keyval == gtk.keysyms.g: # CTRL + g control._on_convert_to_gc_menuitem_activate(None)