Commit 36a92150 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Rename decorator

parent bb660476
......@@ -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,
......
......@@ -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
......
......@@ -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))
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment