From cdec81071d4fcb55bd7852cafa57651b49a5b2d0 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 23 Oct 2026 15:39:56 +0900 Subject: [PATCH] feat: show notice on override --- dzgui/strings/wizard.py | 2 ++ dzgui/views/dialogs/wizard.py | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dzgui/strings/wizard.py b/dzgui/strings/wizard.py index 9662256..a495de8 100644 --- a/dzgui/strings/wizard.py +++ b/dzgui/strings/wizard.py @@ -90,6 +90,8 @@ blurb_flatpak = ( "permission to read from and write to the following locations." ) tree_column = "Paths" +overrides_applied = "Overrides applied." +button_flatpak = "Grant permissions" ### Completion page heading_completion = "Setup complete" diff --git a/dzgui/views/dialogs/wizard.py b/dzgui/views/dialogs/wizard.py index 2639093..1c12d40 100644 --- a/dzgui/views/dialogs/wizard.py +++ b/dzgui/views/dialogs/wizard.py @@ -429,7 +429,6 @@ class FlatpakOverridePage(EnumeratedWizardPage): self.xdg_paths = xdg_paths self.page_type = Gtk.AssistantPageType.INTRO - store = Gtk.ListStore(str) for path in xdg_paths.values(): store.append((str(path),)) @@ -437,15 +436,22 @@ class FlatpakOverridePage(EnumeratedWizardPage): tree.set_halign(Gtk.Align.CENTER) self.authorize_button = Gtk.Button( - label="Grant permissions", halign=Gtk.Align.CENTER + label=wizard.button_flatpak, halign=Gtk.Align.CENTER ) self.authorize_button.connect("clicked", self._on_authorize) - for el in tree, self.authorize_button: + self.notice = NotificationFrame(wizard.overrides_applied) + self.connect("map", self._on_map) + + for el in tree, self.authorize_button, self.notice: self.add_start(el) + def _on_map(self, page: "EnumeratedWizardPage") -> None: + self.notice.hide() + def _on_authorize(self, button: Gtk.Button) -> None: apply_overrides(self.xdg_paths) + self.notice.show() EMITTER.emit("step_complete")