Philipp Hörist pushed to branch openpgp at gajim / gajim
Commits:
f86feb4d by Philipp Hörist at 2026-04-27T23:02:32+02:00
imprv wizard
- - - - -
3 changed files:
- gajim/data/gui/openpgp/restore.ui
- gajim/gtk/assistant.py
- gajim/gtk/openpgp_wizard.py
Changes:
=====================================
gajim/data/gui/openpgp/restore.ui
=====================================
@@ -30,6 +30,7 @@
</child>
<child>
<object class="GtkPasswordEntry" id="_password_entry">
+ <property name="show-peek-icon">true</property>
</object>
</child>
</object>
=====================================
gajim/gtk/assistant.py
=====================================
@@ -60,6 +60,8 @@ def __init__(
self._pages: dict[str, AssistantPage] = {}
self._buttons: dict[str, tuple[Gtk.Button, bool]] = {}
self._button_visible_func = None
+ self._get_current_page_name: str | None = None
+ self._last_page_name: str | None = None
self._ui = get_builder("assistant.ui")
self._ui.main_box.add_css_class("window-padding")
@@ -171,6 +173,11 @@ def get_current_page(self) -> str:
assert name is not None
return name
+ def show_last_page(self) -> None:
+ if self._last_page_name is None:
+ return
+ self.show_page(self._last_page_name,
Gtk.StackTransitionType.SLIDE_RIGHT)
+
def show_page(
self,
name: str,
@@ -188,9 +195,13 @@ def _on_visible_child_name(self, stack: Gtk.Stack, _param:
str) -> None:
if stack.get_visible_child_name() is None:
# Happens for some reason when adding the first page
return
+
+ self._last_page_name = self._get_current_page_name
+ self._get_current_page_name = stack.get_visible_child_name()
+
self.update_title()
self._set_buttons_visible()
- self.emit("page-changed", stack.get_visible_child_name())
+ self.emit("page-changed", self._get_current_page_name)
def __on_button_clicked(self, button: Gtk.Button) -> None:
for button_name, button_data in self._buttons.items():
=====================================
gajim/gtk/openpgp_wizard.py
=====================================
@@ -169,7 +169,7 @@ def _on_assistant_button_clicked(
self.show_page("welcome")
case "back":
- self.show_page("welcome", Gtk.StackTransitionType.SLIDE_RIGHT)
+ self.show_last_page()
case "close":
self.close()
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f86feb4d7ba4584f8029a03efd81451be6801797
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f86feb4d7ba4584f8029a03efd81451be6801797
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]