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 /roster_tweaks/roster_tweaks.py | |
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 'roster_tweaks/roster_tweaks.py')
-rw-r--r-- | roster_tweaks/roster_tweaks.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/roster_tweaks/roster_tweaks.py b/roster_tweaks/roster_tweaks.py index 583c6fe..a0df330 100644 --- a/roster_tweaks/roster_tweaks.py +++ b/roster_tweaks/roster_tweaks.py @@ -5,12 +5,12 @@ from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject -from common import gajim, ged, helpers, pep -from plugins import GajimPlugin -from plugins.helpers import log_calls -from plugins.gui import GajimPluginConfigDialog -from dialogs import ChangeActivityDialog, ChangeMoodDialog -import gtkgui_helpers +from gajim.common import app, ged, helpers, pep +from gajim.plugins import GajimPlugin +from gajim.plugins.helpers import log_calls +from gajim.plugins.gui import GajimPluginConfigDialog +from gajim.dialogs import ChangeActivityDialog, ChangeMoodDialog +from gajim import gtkgui_helpers class RosterTweaksPlugin(GajimPlugin): @@ -34,7 +34,7 @@ class RosterTweaksPlugin(GajimPlugin): self.gui_extension_points = { 'roster_draw_contact': (self.roster_draw_contact, self.disconnect_roster_draw_contact),} - self.roster = gajim.interface.roster + self.roster = app.interface.roster self.config_dialog = RosterTweaksPluginConfigDialog(self) def roster_draw_contact(self, roster,jid, account, contact): @@ -57,10 +57,10 @@ class RosterTweaksPlugin(GajimPlugin): self.connected = False def pep_received(self, obj): - if obj.jid != gajim.get_jid_from_account(obj.conn.name): + if obj.jid != app.get_jid_from_account(obj.conn.name): return - pep_dict = gajim.connections[obj.conn.name].pep + pep_dict = app.connections[obj.conn.name].pep if obj.pep_type == 'mood': img = self.xml.get_object('mood_image') if 'mood' in pep_dict: @@ -78,7 +78,7 @@ class RosterTweaksPlugin(GajimPlugin): def our_show(self, obj): if self.active: - if helpers.get_global_show() != gajim.SHOW_LIST[0]: + if helpers.get_global_show() != app.SHOW_LIST[0]: self.status_widget.set_text(helpers.get_global_status()) else: self.status_widget.set_text('') @@ -145,13 +145,13 @@ class RosterTweaksPlugin(GajimPlugin): def status_changed(self, widget, event): if event.keyval == gtk.keysyms.Return or \ event.keyval == gtk.keysyms.KP_Enter: - accounts = gajim.connections.keys() + accounts = app.connections.keys() message = widget.get_text() for account in accounts: - if not gajim.account_is_connected(account): + if not app.account_is_connected(account): continue - current_show = gajim.SHOW_LIST[ - gajim.connections[account].connected] + current_show = app.SHOW_LIST[ + app.connections[account].connected] self.roster.send_status(account, current_show, message) self.font_desc.set_weight(pango.WEIGHT_BOLD) widget.modify_font(self.font_desc) @@ -177,9 +177,9 @@ class RosterTweaksPlugin(GajimPlugin): self.pep_dict.get('mood_text', None)) def send_pep(self): - accounts = gajim.connections.keys() + accounts = app.connections.keys() for account in accounts: - if gajim.account_is_connected(account): + if app.account_is_connected(account): self.roster.send_pep(account, self.pep_dict) |