Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Eichert
gajim
Commits
db8cf032
Commit
db8cf032
authored
May 02, 2021
by
Philipp Hörist
Browse files
AdHoc: Don’t execute callbacks after dialog is destroyed
parent
99971276
Changes
1
Hide whitespace changes
Inline
Side-by-side
gajim/gtk/adhoc.py
View file @
db8cf032
...
...
@@ -26,13 +26,13 @@
from
gajim.common.i18n
import
_
from
gajim.common.helpers
import
to_user_string
from
.dataform
import
DataFormWidget
from
.util
import
MultiLineLabel
from
.assistant
import
Assistant
from
.assistant
import
Page
from
.assistant
import
ErrorPage
from
.assistant
import
ProgressPage
from
.dataform
import
DataFormWidget
from
.util
import
MultiLineLabel
from
.util
import
ensure_not_destroyed
log
=
logging
.
getLogger
(
'gajim.gui.adhoc'
)
...
...
@@ -77,6 +77,7 @@ def __init__(self, account, jid=None):
jid
,
callback
=
self
.
_received_command_list
)
self
.
show_all
()
@
ensure_not_destroyed
def
_received_command_list
(
self
,
task
):
try
:
commands
=
task
.
finish
()
...
...
@@ -91,6 +92,7 @@ def _received_command_list(self, task):
self
.
get_page
(
'commands'
).
add_commands
(
commands
)
self
.
show_page
(
'commands'
)
@
ensure_not_destroyed
def
_received_stage
(
self
,
task
):
try
:
stage
=
task
.
finish
()
...
...
@@ -112,7 +114,7 @@ def _set_error(self, text, show_command_button):
self
.
show_page
(
'error'
)
def
_on_destroy
(
self
,
*
args
):
pass
self
.
_destroyed
=
True
def
_on_button_clicked
(
self
,
_assistant
,
button_name
):
if
button_name
==
'commands'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment