add "bgcolor" conf param to set background color

This commit is contained in:
Josh Holtrop 2011-07-07 14:00:21 -04:00
parent 74600f47a2
commit 13c1443b02

View File

@ -16,6 +16,8 @@ class Window(object):
self.conf['mailbox'] = 'Inbox'
if not 'updaterate' in self.conf:
self.conf['updaterate'] = 5000
if not 'bgcolor' in self.conf:
self.conf['bgcolor'] = (1.0, 0.5, 0.0)
sticky = True
if 'sticky' in self.conf:
sticky = self.conf['sticky']
@ -28,6 +30,9 @@ class Window(object):
self.window.connect('destroy', self.destroy_event)
self.window.connect('button-release-event', self.button_release)
self.window.set_events(gtk.gdk.BUTTON_RELEASE_MASK)
self.window.modify_bg(gtk.STATE_NORMAL,
gtk.gdk.Color(*map(lambda x: int(65535 * x),
self.conf['bgcolor'])))
self.label = gtk.Label('-')