further rewrites, interface fixes, added temporary icon
This commit is contained in:
@@ -33,7 +33,6 @@ def get_config_dir(app_id: str) -> Path:
|
||||
base = Path(GLib.get_user_config_dir())
|
||||
cfg_dir = base / app_id
|
||||
cfg_dir.mkdir(parents=True, exist_ok=True)
|
||||
print(f"Found config dir at: {cfg_dir}")
|
||||
return cfg_dir
|
||||
|
||||
APP_ID = "gay.valhrafnaz.Gnomeframe"
|
||||
@@ -66,9 +65,10 @@ def save_profile(state: dict[str, bool]) -> None:
|
||||
@Gtk.Template(resource_path='/gay/valhrafnaz/Gnomeframe/ui/window.ui')
|
||||
class GnomeframeWindow(Adw.ApplicationWindow):
|
||||
__gtype_name__ = 'GnomeframeWindow'
|
||||
|
||||
|
||||
viewstack = Gtk.Template.Child()
|
||||
|
||||
btn_reset_profile = Gtk.Template.Child()
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
@@ -79,19 +79,20 @@ class GnomeframeWindow(Adw.ApplicationWindow):
|
||||
reset_action.connect("activate", self._reset_all)
|
||||
self.get_application().add_action(reset_action)
|
||||
|
||||
self.btn_reset_profile.connect("clicked", self._reset_all)
|
||||
self.connect("close-request", self._on_close_request)
|
||||
|
||||
# self.settings = Gio.Settings(schema_id="gay.valhrafnaz.Gnomeframe")
|
||||
# self.settings.bind("window-width", self, "default-width", Gio.SettingsBindFlags.DEFAULT)
|
||||
# self.settings.bind("window-height", self, "default-height", Gio.SettingsBindFlags.DEFAULT)
|
||||
# self.settings.bind("window-maximized", self, "maximized", Gio.SettingsBindFlags.DEFAULT)
|
||||
|
||||
|
||||
def _load_page_templates(self):
|
||||
self.home_page = HomePage(parent=self.viewstack)
|
||||
self.settings_page = SettingsPage(parent=self.viewstack)
|
||||
self.checklist_page = ChecklistPage(parent=self.viewstack, window=self)
|
||||
self.settings_page = SettingsPage(parent=self.viewstack)
|
||||
|
||||
def _reset_all(self, action, param):
|
||||
def _reset_all(self, param):
|
||||
self._profile.clear()
|
||||
button = self.checklist_page.btns_basic.get_first_child()
|
||||
while button is not None:
|
||||
|
||||
Reference in New Issue
Block a user