Add left-2click option to hide stat windows.

Gerko, so I assume others don't have a middle mouse button.
This commit is contained in:
Worros 2010-01-23 14:38:53 +08:00
parent d3f17f3fb7
commit 6b38976edc

View File

@ -676,6 +676,11 @@ class Stat_Window:
return True return True
if event.button == 1: # left button event if event.button == 1: # left button event
# close on double click for a stat window
# for those that don't have a mouse with middle button
if event.type == gtk.gdk._2BUTTON_PRESS:
self.window.hide()
return True
# TODO: make position saving save sizes as well? # TODO: make position saving save sizes as well?
if event.state & gtk.gdk.SHIFT_MASK: if event.state & gtk.gdk.SHIFT_MASK:
self.window.begin_resize_drag(gtk.gdk.WINDOW_EDGE_SOUTH_EAST, event.button, int(event.x_root), int(event.y_root), event.time) self.window.begin_resize_drag(gtk.gdk.WINDOW_EDGE_SOUTH_EAST, event.button, int(event.x_root), int(event.y_root), event.time)