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
pg mr
gajim
Commits
36a92150
Commit
36a92150
authored
Sep 25, 2020
by
Philipp Hörist
Browse files
Rename decorator
parent
bb660476
Changes
6
Hide whitespace changes
Inline
Side-by-side
gajim/common/modules/discovery.py
View file @
36a92150
...
...
@@ -23,7 +23,7 @@
from
gajim.common
import
app
from
gajim.common.nec
import
NetworkIncomingEvent
from
gajim.common.nec
import
NetworkEvent
from
gajim.common.modules.util
import
task
from
gajim.common.modules.util
import
as_
task
from
gajim.common.modules.base
import
BaseModule
...
...
@@ -194,7 +194,7 @@ def _answer_disco_info(self, _con, stanza, _properties):
if
self
.
_con
.
get_module
(
'AdHocCommands'
).
command_info_query
(
stanza
):
raise
nbxmpp
.
NodeProcessed
@
task
@
as_
task
def
disco_muc
(
self
,
jid
,
request_vcard
=
False
,
...
...
gajim/common/modules/user_avatar.py
View file @
36a92150
...
...
@@ -20,7 +20,7 @@
from
gajim.common
import
app
from
gajim.common.modules.base
import
BaseModule
from
gajim.common.modules.util
import
event_node
from
gajim.common.modules.util
import
task
from
gajim.common.modules.util
import
as_
task
class
UserAvatar
(
BaseModule
):
...
...
@@ -62,7 +62,7 @@ def _avatar_metadata_received(self, _con, _stanza, properties):
self
.
_log
.
info
(
'Request: %s %s'
,
jid
,
avatar_info
.
id
)
self
.
_request_avatar
(
jid
,
avatar_info
)
@
task
@
as_
task
def
_request_avatar
(
self
,
jid
,
avatar_info
):
_task
=
yield
...
...
gajim/common/modules/util.py
View file @
36a92150
...
...
@@ -92,7 +92,7 @@ def process(self, msg, kwargs):
return
'(%s) %s'
%
(
self
.
extra
[
'account'
],
msg
),
kwargs
def
task
(
func
):
def
as_
task
(
func
):
@
wraps
(
func
)
def
func_wrapper
(
self
,
*
args
,
callback
=
None
,
user_data
=
None
,
**
kwargs
):
task_
=
Task
(
func
(
self
,
*
args
,
**
kwargs
))
...
...
gajim/common/modules/vcard_avatars.py
View file @
36a92150
...
...
@@ -21,7 +21,7 @@
from
gajim.common
import
app
from
gajim.common.modules.base
import
BaseModule
from
gajim.common.modules.util
import
task
from
gajim.common.modules.util
import
as_
task
class
VCardAvatars
(
BaseModule
):
...
...
@@ -43,7 +43,7 @@ def pass_disco(self, info):
self
.
avatar_conversion_available
=
is_available
self
.
_log
.
info
(
'Discovered Avatar Conversion'
)
@
task
@
as_
task
def
_request_vcard
(
self
,
jid
,
expected_sha
,
type_
):
_task
=
yield
...
...
gajim/gtk/profile.py
View file @
36a92150
...
...
@@ -29,7 +29,7 @@
from
gajim.common
import
app
from
gajim.common.i18n
import
_
from
gajim.common.const
import
AvatarSize
from
gajim.common.modules.util
import
task
from
gajim.common.modules.util
import
as_
task
from
gajim
import
gtkgui_helpers
...
...
@@ -315,7 +315,7 @@ def on_ok_button_clicked(self, widget):
self
.
update_progressbar_timeout_id
=
GLib
.
timeout_add
(
100
,
self
.
update_progressbar
)
@
task
@
as_
task
def
_request_vcard
(
self
):
_task
=
yield
...
...
gajim/vcard.py
View file @
36a92150
...
...
@@ -45,7 +45,7 @@
from
gajim.common.i18n
import
_
from
gajim.common.const
import
AvatarSize
from
gajim.common.nec
import
EventHelper
from
gajim.common.modules.util
import
task
from
gajim.common.modules.util
import
as_
task
from
gajim.gtk.util
import
get_builder
...
...
@@ -247,7 +247,7 @@ def clear_values(self):
widget
.
set_text
(
''
)
self
.
xml
.
get_object
(
'DESC_textview'
).
get_buffer
().
set_text
(
''
)
@
task
@
as_
task
def
_request_vcard
(
self
,
jid
):
_task
=
yield
...
...
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