Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
8baf8b09 by wurstsalat at 2024-11-28T23:05:37+01:00
cfix: AccountWizard: Fix displaying assistant buttons in advanced page
Fixes #12151
- - - - -
2 changed files:
- gajim/gtk/account_wizard.py
- gajim/gtk/assistant.py
Changes:
=====================================
gajim/gtk/account_wizard.py
=====================================
@@ -68,7 +68,7 @@
class AccountWizard(Assistant):
def __init__(self) -> None:
- Assistant.__init__(self, height=500)
+ Assistant.__init__(self, name="AccountWizard", height=500)
self._client: Client | None = None
self._method: str = "login"
self._destroyed: bool = False
@@ -987,10 +987,13 @@ def _set_complete(self, *args: Any) -> None:
self.update_page_complete()
def get_visible_buttons(self) -> list[str]:
- return ["back", cast(AccountWizard,
self.get_root()).get_current_method()]
+ return [
+ "back",
+ cast(AccountWizard,
get_app_window("AccountWizard")).get_current_method(),
+ ]
def get_default_button(self) -> str:
- return cast(AccountWizard, self.get_root()).get_current_method()
+ return cast(AccountWizard,
get_app_window("AccountWizard")).get_current_method()
class SecurityWarning(Page):
@@ -1050,7 +1053,10 @@ def trust_certificate(self) -> bool:
return self._ui.trust_cert_checkbutton.get_active()
def get_visible_buttons(self) -> list[str]:
- return ["back", cast(AccountWizard,
self.get_root()).get_current_method()]
+ return [
+ "back",
+ cast(AccountWizard,
get_app_window("AccountWizard")).get_current_method(),
+ ]
def get_default_button(self) -> str:
return "back"
@@ -1223,7 +1229,7 @@ def _save_config(self) -> None:
self._account, "account_label", self._label
)
app.css_config.refresh()
- window = cast(AccountsWindow, get_app_window("AccountsWindow"))
+ window = cast(AccountsWindow | None, get_app_window("AccountsWindow"))
if window is not None:
window.update_account_label(self._account)
=====================================
gajim/gtk/assistant.py
=====================================
@@ -40,6 +40,7 @@ class Assistant(GObject.Object, GajimAppWindow, EventHelper):
def __init__(
self,
+ name: str = "Assistant",
transient_for: Gtk.Window | None = None,
width: int = 550,
height: int = 400,
@@ -48,7 +49,7 @@ def __init__(
GObject.Object.__init__(self)
GajimAppWindow.__init__(
self,
- name="Assistant",
+ name=name,
transient_for=transient_for,
default_width=width,
default_height=height,
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/8baf8b092f2ebd2f2b3cfe4cfd52b165840e3834
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/8baf8b092f2ebd2f2b3cfe4cfd52b165840e3834
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]