update HamsterIntegrationPlugin to py3
This commit is contained in:
@@ -1 +1 @@
|
|||||||
from hamster import HamsterIntegrationPlugin
|
from .hamster import HamsterIntegrationPlugin
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import dbus
|
import dbus
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
import gobject
|
from gi.repository import GObject
|
||||||
from common import gajim
|
from common import gajim
|
||||||
from common import ged
|
from common import ged
|
||||||
from common import dbus_support
|
from common import dbus_support
|
||||||
@@ -13,7 +13,7 @@ from common.pep import ACTIVITIES
|
|||||||
|
|
||||||
HAMSTAER_INTERFACE = 'org.gnome.Hamster'
|
HAMSTAER_INTERFACE = 'org.gnome.Hamster'
|
||||||
SUBACTIVITIES = []
|
SUBACTIVITIES = []
|
||||||
subactivity_ = [ACTIVITIES[x].keys() for x in ACTIVITIES.keys()]
|
subactivity_ = [list(ACTIVITIES[x].keys()) for x in list(ACTIVITIES.keys())]
|
||||||
for x in subactivity_ :
|
for x in subactivity_ :
|
||||||
SUBACTIVITIES = SUBACTIVITIES + x
|
SUBACTIVITIES = SUBACTIVITIES + x
|
||||||
SUBACTIVITIES = set(SUBACTIVITIES)
|
SUBACTIVITIES = set(SUBACTIVITIES)
|
||||||
@@ -65,7 +65,7 @@ class HamsterIntegrationPlugin(GajimPlugin):
|
|||||||
if not facts:
|
if not facts:
|
||||||
return
|
return
|
||||||
if self.from_dbus_fact(facts[-1])['end_time']:
|
if self.from_dbus_fact(facts[-1])['end_time']:
|
||||||
accounts = gajim.connections.keys()
|
accounts = list(gajim.connections.keys())
|
||||||
for account in accounts:
|
for account in accounts:
|
||||||
if gajim.account_is_connected(account):
|
if gajim.account_is_connected(account):
|
||||||
connection = gajim.connections[account]
|
connection = gajim.connections[account]
|
||||||
@@ -106,4 +106,4 @@ class HamsterIntegrationPlugin(GajimPlugin):
|
|||||||
id = fact[0])
|
id = fact[0])
|
||||||
|
|
||||||
def on_signed_in(self, network_event):
|
def on_signed_in(self, network_event):
|
||||||
gobject.timeout_add(5000,self.hamster_facts_changed)
|
GObject.timeout_add(5000,self.hamster_facts_changed)
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ description: Integration with project hamster
|
|||||||
and http://projecthamster.wordpress.com/about/
|
and http://projecthamster.wordpress.com/about/
|
||||||
authors: Denis Fomin <fominde@gmail.com>
|
authors: Denis Fomin <fominde@gmail.com>
|
||||||
homepage: http://trac-plugins.gajim.org/wiki/
|
homepage: http://trac-plugins.gajim.org/wiki/
|
||||||
max_gajim_version: 0.15.9
|
min_gajim_version: 0.15.10
|
||||||
|
|||||||
Reference in New Issue
Block a user