|
|
@ -653,31 +653,9 @@ class Interface(object): |
|
|
|
def _window_to_tray(self, statusicon, user_data=None): |
|
|
|
def _window_to_tray(self, statusicon, user_data=None): |
|
|
|
"""Minimize/display main window (as in minimize to tray.)""" |
|
|
|
"""Minimize/display main window (as in minimize to tray.)""" |
|
|
|
if self._main_window.get_property('visible'): |
|
|
|
if self._main_window.get_property('visible'): |
|
|
|
(x, y) = self._main_window.get_position() |
|
|
|
self._main_window.hide() |
|
|
|
(width, height) = self._main_window.get_size() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_x'] = x |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_y'] = y |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['width'] = width |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['height'] = height |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._main_window.hide_all() |
|
|
|
|
|
|
|
else: |
|
|
|
else: |
|
|
|
_log.debug('Size: %d x %d', |
|
|
|
self._main_window.show() |
|
|
|
self._options[self.NAMESPACE]['width'], |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['height']) |
|
|
|
|
|
|
|
_log.debug('Position: %d x %d', |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_x'], |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_y']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._main_window.show_all() |
|
|
|
|
|
|
|
self._main_window.resize( |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['width'], |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['height']) |
|
|
|
|
|
|
|
self._main_window.move( |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_x'], |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_y']) |
|
|
|
|
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------ |
|
|
|
# ------------------------------------------------------------ |
|
|
|