diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-07-17 02:42:50 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-08-18 22:35:29 +0300 |
commit | 9ce1c5b96120b412e5fbbe25bb03b9ab245a4221 (patch) | |
tree | 3884f1ad0ec35b224cc57f467c2e24d2776e86c8 /hamster | |
parent | 507bf9a93394d9db3fddd696183b3b8920ff92d8 (diff) |
Use absolute imports on all pluginsomemo_2.3.6
This is necessary because Gajim is with 0.16.11 a python package
Diffstat (limited to 'hamster')
-rw-r--r-- | hamster/hamster.py | 30 | ||||
-rw-r--r-- | hamster/manifest.ini | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/hamster/hamster.py b/hamster/hamster.py index ac8b996..d4ff9a0 100644 --- a/hamster/hamster.py +++ b/hamster/hamster.py @@ -5,13 +5,13 @@ import datetime as dt from gi.repository import GObject import os -from common import gajim -from common import ged -from common import dbus_support +from gajim.common import app +from gajim.common import ged +from gajim.common import dbus_support -from plugins import GajimPlugin -from plugins.helpers import log_calls, log -from common.pep import ACTIVITIES +from gajim.plugins import GajimPlugin +from gajim.plugins.helpers import log_calls, log +from gajim.common.pep import ACTIVITIES HAMSTAER_INTERFACE = 'org.gnome.Hamster' SUBACTIVITIES = [] @@ -45,12 +45,12 @@ class HamsterIntegrationPlugin(GajimPlugin): self.session_presence = self.bus.get_object(HAMSTAER_INTERFACE, '/org/gnome/Hamster') except: - gajim.log.debug('Hamster D-Bus service not found') + app.log.debug('Hamster D-Bus service not found') return self.bus.add_signal_receiver(self.hamster_facts_changed, 'FactsChanged', HAMSTAER_INTERFACE) - gajim.ged.register_event_handler('signed-in', ged.POSTGUI, + app.ged.register_event_handler('signed-in', ged.POSTGUI, self.on_signed_in) @log_calls('HamsterIntegrationPlugin') @@ -60,7 +60,7 @@ class HamsterIntegrationPlugin(GajimPlugin): self.bus.remove_signal_receiver(self.hamster_facts_changed, "FactsChanged", dbus_interface=HAMSTAER_INTERFACE) - gajim.ged.remove_event_handler('signed-in', ged.POSTGUI, + app.ged.remove_event_handler('signed-in', ged.POSTGUI, self.on_signed_in) def hamster_facts_changed(self, *args, **kw): @@ -70,10 +70,10 @@ class HamsterIntegrationPlugin(GajimPlugin): if not facts: return if self.from_dbus_fact(facts[-1])['end_time']: - accounts = list(gajim.connections.keys()) + accounts = list(app.connections.keys()) for account in accounts: - if gajim.account_is_connected(account): - connection = gajim.connections[account] + if app.account_is_connected(account): + connection = app.connections[account] connection.retract_activity() return @@ -90,9 +90,9 @@ class HamsterIntegrationPlugin(GajimPlugin): subactivity=list(subactivity_candidates)[0] # send activity - for account in gajim.connections: - if gajim.account_is_connected(account): - connection = gajim.connections[account] + for account in app.connections: + if app.account_is_connected(account): + connection = app.connections[account] connection.send_activity(activity, subactivity, last_fact['fact']) diff --git a/hamster/manifest.ini b/hamster/manifest.ini index 8182cab..851129a 100644 --- a/hamster/manifest.ini +++ b/hamster/manifest.ini @@ -1,10 +1,10 @@ [info] name: Hamster integration short_name: hamster_integration -version: 0.1.3 +version: 0.1.4 description: Integration with project hamster see https://trac.gajim.org/ticket/6993 and http://projecthamster.wordpress.com/about/ authors: Denis Fomin <fominde@gmail.com> homepage: http://trac-plugins.gajim.org/wiki/ -min_gajim_version: 0.16.10 +min_gajim_version: 0.16.11 |