Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
f9be8b99
Commit
f9be8b99
authored
2 years ago
by
Daniel Brötzmann
Browse files
Options
Downloads
Patches
Plain Diff
fix: AccountsWindow: Use get_app_window to reliably access window's methods
Fixes #10911
parent
41d6387c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/gtk/accounts.py
+5
-2
5 additions, 2 deletions
gajim/gtk/accounts.py
with
5 additions
and
2 deletions
gajim/gtk/accounts.py
+
5
−
2
View file @
f9be8b99
...
...
@@ -44,6 +44,7 @@
from
.settings
import
SettingsDialog
from
.settings
import
SettingsBox
from
.settings
import
PopoverSetting
from
.util
import
get_app_window
from
.util
import
open_window
log
=
logging
.
getLogger
(
'
gajim.gui.accounts
'
)
...
...
@@ -564,7 +565,8 @@ def _disable() -> None:
if
(
account
in
app
.
connections
and
not
app
.
connections
[
account
].
state
.
is_disconnected
):
# Connecting or connected
window
=
cast
(
Gtk
.
Window
,
self
.
get_toplevel
())
window
=
get_app_window
(
'
AccountsWindow
'
)
assert
window
is
not
None
ConfirmationDialog
(
_
(
'
Disable Account
'
),
_
(
'
Account %s is still connected
'
)
%
account
,
...
...
@@ -705,7 +707,8 @@ def __init__(self, account: str) -> None:
GenericSettingPage
.
__init__
(
self
,
account
,
settings
)
def
_on_account_name_change
(
self
,
*
args
:
Any
)
->
None
:
window
=
cast
(
AccountsWindow
,
self
.
get_toplevel
())
window
=
get_app_window
(
'
AccountsWindow
'
)
assert
window
is
not
None
window
.
update_account_label
(
self
.
account
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment