make update rate configurable
This commit is contained in:
parent
2d704d0b9c
commit
74600f47a2
@ -14,6 +14,8 @@ class Window(object):
|
||||
self.conf['height'] = 32
|
||||
if not 'mailbox' in self.conf:
|
||||
self.conf['mailbox'] = 'Inbox'
|
||||
if not 'updaterate' in self.conf:
|
||||
self.conf['updaterate'] = 5000
|
||||
sticky = True
|
||||
if 'sticky' in self.conf:
|
||||
sticky = self.conf['sticky']
|
||||
@ -48,7 +50,7 @@ class Window(object):
|
||||
self.conf['server'], self.conf['port'])
|
||||
self.connection.login(self.conf['user'], self.conf['password'])
|
||||
self.update()
|
||||
gobject.timeout_add(5000, self.update)
|
||||
gobject.timeout_add(self.conf['updaterate'], self.update)
|
||||
except:
|
||||
self.connection = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user