|
|
|
@ -635,6 +635,14 @@ class Interface(object):
|
|
|
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
def _window_to_tray(self, statusicon, user_data=None): |
|
|
|
|
"""Minimize/display main window (as in minimize to tray.)""" |
|
|
|
|
if self._main_window.get_property('visible'): |
|
|
|
|
self._main_window.hide_all() |
|
|
|
|
else: |
|
|
|
|
self._main_window.show_all() |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------ |
|
|
|
|
# Helper functions |
|
|
|
|
# ------------------------------------------------------------ |
|
|
|
@ -1421,6 +1429,7 @@ class Interface(object):
|
|
|
|
|
if self._options[self.NAMESPACE]['statusicon']: |
|
|
|
|
self._statusicon = gtk.StatusIcon() |
|
|
|
|
self._statusicon.set_from_pixbuf(self._images['icon']) |
|
|
|
|
self._statusicon.connect('activate', self._window_to_tray) |
|
|
|
|
else: |
|
|
|
|
self._statusicon = None |
|
|
|
|
|
|
|
|
|