Add a keybinding (alt+space) to activity window to hide/show tray
This commit is contained in:
parent
5a4ec4f761
commit
34d935b2af
2
NEWS
2
NEWS
@ -1,3 +1,5 @@
|
|||||||
|
* Add a keybinding (alt+space) to activity window to hide/show tray (erikos)
|
||||||
|
|
||||||
Snapshot efd0bbd326
|
Snapshot efd0bbd326
|
||||||
|
|
||||||
* Add support to be able to remove an alert which is not the top
|
* Add support to be able to remove an alert which is not the top
|
||||||
|
@ -23,6 +23,7 @@ class Window(gtk.Window):
|
|||||||
|
|
||||||
self.connect('realize', self.__window_realize_cb)
|
self.connect('realize', self.__window_realize_cb)
|
||||||
self.connect('window-state-event', self.__window_state_event_cb)
|
self.connect('window-state-event', self.__window_state_event_cb)
|
||||||
|
self.connect('key-press-event', self.__key_press_cb)
|
||||||
|
|
||||||
self.toolbox = None
|
self.toolbox = None
|
||||||
self._alerts = []
|
self._alerts = []
|
||||||
@ -107,6 +108,13 @@ class Window(gtk.Window):
|
|||||||
if self.tray is not None:
|
if self.tray is not None:
|
||||||
self.tray.show()
|
self.tray.show()
|
||||||
|
|
||||||
|
def __key_press_cb(self, widget, event):
|
||||||
|
if event.state & gtk.gdk.MOD1_MASK:
|
||||||
|
if gtk.gdk.keyval_name(event.keyval) == 'space':
|
||||||
|
self.tray.props.visible = not self.tray.props.visible
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def get_canvas_screenshot(self):
|
def get_canvas_screenshot(self):
|
||||||
if not self.canvas:
|
if not self.canvas:
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user