From e3f53dd3c62255f2dad2ede541d7dec7316b0a50 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 17 Apr 2005 11:49:39 +0000 Subject: [PATCH] idle now works --- src/common/connection.py | 6 +++--- src/common/sleepy.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index bd3ac80e1..c8d7b5d08 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -491,8 +491,8 @@ class connection: ptype = 'available' if status == 'invisible': ptype = 'invisible' - prio = gajim.config.get_per('accounts', self.name, 'priority') - self.connection.sendPresence(ptype, str(prio), status, msg, signed) + prio = str(gajim.config.get_per('accounts', self.name, 'priority')) + self.connection.sendPresence(ptype, prio, status, msg, signed) self.dispatch('STATUS', status) #ask our VCard iq = common.jabber.Iq(type='get') @@ -510,7 +510,7 @@ class connection: ptype = 'available' if status == 'invisible': ptype = 'invisible' - prio = gajim.config.get_per('accounts', self.name, 'priority') + prio = str(gajim.config.get_per('accounts', self.name, 'priority')) self.connection.sendPresence(ptype, prio, status, msg, signed) self.dispatch('STATUS', status) diff --git a/src/common/sleepy.py b/src/common/sleepy.py index 53c274d49..b446e865a 100644 --- a/src/common/sleepy.py +++ b/src/common/sleepy.py @@ -27,7 +27,7 @@ STATE_AWAKE = "awake" SUPPORTED = 1 try: - import idle + import common.idle except: SUPPORTED = 0 @@ -39,7 +39,7 @@ class Sleepy: self.interval2 = interval2 self.state = STATE_AWAKE ## assume were awake to stake with try: - idle.init() + common.idle.init() except: SUPPORTED = 0 self.state = STATE_UNKNOWN @@ -47,7 +47,7 @@ class Sleepy: def poll(self): if not SUPPORTED: return 0 - idleTime = idle.getIdleSec() + idleTime = common.idle.getIdleSec() if idleTime > self.interval2: self.state = STATE_XAWAY elif idleTime > self.interval1: