|
|
@ -639,8 +639,23 @@ class Interface(object): |
|
|
|
"""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'): |
|
|
|
self._main_window.hide_all() |
|
|
|
self._main_window.hide_all() |
|
|
|
|
|
|
|
(x, y) = self._main_window.get_position() |
|
|
|
|
|
|
|
_log.debug('Current position: %d x %d', x, y) |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_x'] = x |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_y'] = y |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(width, height) = self._main_window.get_size() |
|
|
|
|
|
|
|
_log.debug('Current window size: %d x %d', width, height) |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['width'] = width |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['height'] = height |
|
|
|
else: |
|
|
|
else: |
|
|
|
self._main_window.show_all() |
|
|
|
self._main_window.show_all() |
|
|
|
|
|
|
|
main_window.resize( |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['width'], |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['height']) |
|
|
|
|
|
|
|
main_window.move( |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_x'], |
|
|
|
|
|
|
|
self._options[self.NAMESPACE]['position_y']) |
|
|
|
return |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------ |
|
|
|
# ------------------------------------------------------------ |
|
|
|