def on_configure_event(self, window, event): state = event.window.get_state() nosave = Gdk.WindowState.FULLSCREEN | Gdk.WindowState.MAXIMIZED if not (state & nosave): variant = GLib.Variant('(ii)', (event.width, event.height)) settings.set_value('window-size', variant) maximised = state & Gdk.WindowState.MAXIMIZED window_state = 'maximized' if maximised else 'normal' settings.set_string('window-state', window_state)
def on_configure_event(self, window, event): state = event.window.get_state() nosave = Gdk.WindowState.FULLSCREEN | Gdk.WindowState.MAXIMIZED if not (state & nosave): variant = GLib.Variant("(ii)", (event.width, event.height)) settings.set_value("window-size", variant) maximised = state & Gdk.WindowState.MAXIMIZED window_state = "maximized" if maximised else "normal" settings.set_string("window-state", window_state)
def _update_filter_string(self, *args): value = [(row[0], row[1], row[2]) for row in self.model] settings.set_value(self.key, GLib.Variant('a(sbs)', value))
def _update_columns(self, *args): value = [(c[1].lower(), c[0]) for c in self.model] settings.set_value(self.key, GLib.Variant('a(sb)', value))
def on_configure_event(self, window, event): state = event.window.get_state() nosave = Gdk.WindowState.FULLSCREEN | Gdk.WindowState.MAXIMIZED if not (state & nosave): variant = GLib.Variant('(ii)', (event.width, event.height)) settings.set_value('window-size', variant)
def _update_columns(self, *args): value = [(c[1].lower(), c[0]) for c in self.model] settings.set_value(self.settings_key, GLib.Variant('a(sb)', value))
def _update_filter_string(self, *args): value = [(row[0], row[1], row[2]) for row in self.model] settings.set_value(self.settings_key, GLib.Variant('a(sbs)', value))