From b0a1fc2525efb1deb77a56831e1af4feda96d6d4 Mon Sep 17 00:00:00 2001 From: rdbende Date: Sun, 3 Dec 2023 11:57:17 +0100 Subject: [PATCH] Don't just hide the preferences window --- cozy/ui/preferences_view.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cozy/ui/preferences_view.py b/cozy/ui/preferences_view.py index 709488a1..3fa2ca0b 100644 --- a/cozy/ui/preferences_view.py +++ b/cozy/ui/preferences_view.py @@ -1,11 +1,9 @@ -from gi.repository import Gtk -from cozy.view_model.settings_view_model import SettingsViewModel -import gi -from gi.repository import Adw, Gio +from gi.repository import Adw, Gio, Gtk from cozy.ext import inject from cozy.ui.widgets.error_reporting import ErrorReporting from cozy.ui.widgets.storage_list_box_row import StorageListBoxRow +from cozy.view_model.settings_view_model import SettingsViewModel @Gtk.Template.from_resource('/com/github/geigi/cozy/preferences.ui') @@ -46,8 +44,6 @@ def __init__(self, **kwargs): self._bind_settings() self._bind_view_model() - self.connect("close-request", self._hide_window) - self.sleep_timer_fadeout_switch.connect("notify::active", self._on_sleep_fadeout_switch_changed) self.fadeout_duration_spin_button.set_sensitive(self.sleep_timer_fadeout_switch.props.active) @@ -159,7 +155,4 @@ def _on_lock_ui_changed(self): self.external_storage_toggle_button.set_sensitive(sensitive) self.default_storage_button.set_sensitive(sensitive) self._on_storage_box_changed(None, self.storage_list_box.get_selected_row()) - - def _hide_window(self, *_): - self.hide() - return True +