Permalink
Browse files

Merge pull request #1319 from moneycat/master

gui.gtkui.ConversationManager: Make Ctrl+W to close tab work without escape shortcut enabled. Refs #1139.
  • Loading branch information...
2 parents 5437b29 + d2f7b35 commit c82b821740cb942c05faeab97c2ea077c85bd4df @c10ud c10ud committed May 31, 2012
Showing with 9 additions and 5 deletions.
  1. +9 −5 emesene/gui/gtkui/ConversationManager.py
@@ -96,11 +96,15 @@ def on_key_close_tab(self, accel_group, window, keyval, modifier):
'''Catches events like Ctrl+W and closes current tab'''
if not self.get_focus_child():
return
- if self.session.config.get_or_set('b_escape_hotkey', True):
- index = self.get_current_page()
- conversation = self.get_nth_page(index)
- self.close(conversation)
- return True
+ if (keyval == gtk.keysyms.Escape and modifier == 0 ) and \
+ not self.session.config.get_or_set('b_escape_hotkey', True):
+ return
+
+ index = self.get_current_page()
+ conversation = self.get_nth_page(index)
+ self.close(conversation)
+
+ return True
def on_key_change_tab(self, accelGroup, window, keyval, modifier):
'''Catches alt+number and shows tab number-1 '''

0 comments on commit c82b821

Please sign in to comment.