Beispiel #1
0
    def on_window_leave_notify_event(self, widget, event):
        ox, oy, ow, oh = self._get_geometry_from_settings()

        x, y = widget.get_position()
        w, h = widget.get_size()

        if x != ox or y != oy:
            SETTINGS_GEOMETRY.set_int("window-x", x)
            SETTINGS_GEOMETRY.set_int("window-y", y)

        if w != ow or h != oh:
            SETTINGS_GEOMETRY.set_int("window-width", w)
            SETTINGS_GEOMETRY.set_int("window-height", h)
Beispiel #2
0
    def on_window_leave_notify_event(self, widget, event):
        ox, oy, ow, oh = self._get_geometry_from_settings()

        x, y = widget.get_position()
        w, h = widget.get_size()

        if x != ox or y != oy:
            SETTINGS_GEOMETRY.set_int('window-x', x)
            SETTINGS_GEOMETRY.set_int('window-y', y)

        if w != ow or h != oh:
            SETTINGS_GEOMETRY.set_int('window-width', w)
            SETTINGS_GEOMETRY.set_int('window-height', h)
Beispiel #3
0
 def _get_geometry_from_settings(self):
     x = SETTINGS_GEOMETRY.get_int("window-x")
     y = SETTINGS_GEOMETRY.get_int("window-y")
     w = SETTINGS_GEOMETRY.get_int("window-width")
     h = SETTINGS_GEOMETRY.get_int("window-height")
     return x, y, w, h
Beispiel #4
0
 def _get_geometry_from_settings(self):
     x = SETTINGS_GEOMETRY.get_int('window-x')
     y = SETTINGS_GEOMETRY.get_int('window-y')
     w = SETTINGS_GEOMETRY.get_int('window-width')
     h = SETTINGS_GEOMETRY.get_int('window-height')
     return x, y, w, h