Philipp Hörist pushed to branch master at gajim / gajim


Commits:
983fddc0 by Philipp Hörist at 2024-12-15T14:28:12+01:00
fix: PasswordDialog: Show dialog for multiple accounts

- - - - -


3 changed files:

- gajim/gtk/main.py
- gajim/gtk/password_dialog.py
- gajim/gtk/util.py


Changes:

=====================================
gajim/gtk/main.py
=====================================
@@ -333,7 +333,7 @@ def _on_plain_connection(event: events.PlainConnection) -> 
None:
 
     @staticmethod
     def _on_password_required(event: events.PasswordRequired) -> None:
-        open_window("PasswordDialog", event=event)
+        open_window("PasswordDialog", account=event.client.account, 
event=event)
 
     @staticmethod
     def _on_http_auth(event: events.HttpAuth) -> None:


=====================================
gajim/gtk/password_dialog.py
=====================================
@@ -18,7 +18,7 @@
 
 
 class PasswordDialog(GajimAppWindow):
-    def __init__(self, event: PasswordRequired) -> None:
+    def __init__(self, account: str, event: PasswordRequired) -> None:
         GajimAppWindow.__init__(
             self,
             name="PasswordDialog",
@@ -32,7 +32,7 @@ def __init__(self, event: PasswordRequired) -> None:
         self._connect(self._ui.cancel_button, "clicked", self._on_cancel)
         self._connect(self._ui.ok_button, "clicked", self._on_ok)
 
-        self.account = event.client.account
+        self.account = account
         self._client = app.get_client(event.client.account)
         self._event = event
 


=====================================
gajim/gtk/util.py
=====================================
@@ -444,11 +444,11 @@ def get_app_window(
             continue
 
         if account is not None:
-            if account != win.account:  # pyright: ignore
+            if account != win.wrapper.account:  # pyright: ignore
                 continue
 
         if jid is not None:
-            if jid != win.jid:  # pyright: ignore
+            if jid != win.wrapper.jid:  # pyright: ignore
                 continue
         return win.wrapper  # pyright: ignore
     return None



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/983fddc0df6ca3065b8be6f1d63ce3cbd1f34176

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/983fddc0df6ca3065b8be6f1d63ce3cbd1f34176
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]

Reply via email to