hide window when we press esc if we have systray

This commit is contained in:
Yann Leboulanger 2005-09-20 19:57:34 +00:00
parent bc25dbef03
commit e39f1a30e8
2 changed files with 7 additions and 0 deletions

View File

@ -22,6 +22,7 @@
<property name="focus_on_map">True</property>
<signal name="delete_event" handler="on_roster_window_delete_event" last_modification_time="Mon, 21 Mar 2005 12:34:59 GMT"/>
<signal name="focus_in_event" handler="on_roster_window_focus_in_event" last_modification_time="Sun, 04 Sep 2005 16:33:35 GMT"/>
<signal name="key_press_event" handler="on_roster_window_key_press_event" last_modification_time="Tue, 20 Sep 2005 19:26:27 GMT"/>
<child>
<widget class="GtkVBox" id="roster_vbox">

View File

@ -1632,6 +1632,12 @@ _('If "%s" accepts this request you will know his status.') %jid)
if widget.props.urgency_hint:
widget.props.urgency_hint = False
def on_roster_window_key_press_event(self, widget, event):
if event.keyval == gtk.keysyms.Escape:
if self.plugin.systray_enabled and not gajim.config.get('quit_on_roster_x_button'):
self.tooltip.hide_tooltip()
self.window.hide()
def quit_gtkgui_plugin(self):
'''When we quit the gtk plugin :
tell that to the core and exit gtk'''