idle now works

This commit is contained in:
Yann Leboulanger 2005-04-17 11:49:39 +00:00
parent eb9eddce19
commit e3f53dd3c6
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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: