make update rate configurable

This commit is contained in:
Josh Holtrop 2011-07-07 13:08:03 -04:00
parent 2d704d0b9c
commit 74600f47a2

View File

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