rework handling of 'sticky' conf item to match others

This commit is contained in:
Josh Holtrop 2011-07-19 14:32:42 -04:00
parent cf66a347b1
commit fae48b4a8d

View File

@ -41,17 +41,17 @@ class Window(object):
self.conf['mouse']['right'] = 'exit'
if not 'always_on_top' in self.conf:
self.conf['always_on_top'] = True
if not 'sticky' in self.conf:
self.conf['sticky'] = True
self.font_sz = int(1024 * self.conf['font_size'])
self.fgcolor = ''.join(map(lambda x: '%02x' % int(0xFF * x),
self.conf['fgcolor']))
sticky = True
if 'sticky' in self.conf:
sticky = self.conf['sticky']
self.window = gtk.Window()
self.window.set_title(title)
self.window.set_decorated(False)
if sticky:
if self.conf['sticky']:
self.window.stick()
if self.conf['always_on_top']:
self.window.set_keep_above(True)