add 'always_on_top' config item and capability
This commit is contained in:
parent
07756a8b19
commit
183a5c8076
@ -39,6 +39,8 @@ class Window(object):
|
|||||||
self.conf['mouse']['middle'] = 'reconnect'
|
self.conf['mouse']['middle'] = 'reconnect'
|
||||||
if not 'right' in self.conf['mouse']:
|
if not 'right' in self.conf['mouse']:
|
||||||
self.conf['mouse']['right'] = 'exit'
|
self.conf['mouse']['right'] = 'exit'
|
||||||
|
if not 'always_on_top' in self.conf:
|
||||||
|
self.conf['always_on_top'] = True
|
||||||
self.font_sz = int(1024 * self.conf['font_size'])
|
self.font_sz = int(1024 * self.conf['font_size'])
|
||||||
self.fgcolor = ''.join(map(lambda x: '%02x' % int(0xFF * x),
|
self.fgcolor = ''.join(map(lambda x: '%02x' % int(0xFF * x),
|
||||||
self.conf['fgcolor']))
|
self.conf['fgcolor']))
|
||||||
@ -51,6 +53,8 @@ class Window(object):
|
|||||||
self.window.set_decorated(False)
|
self.window.set_decorated(False)
|
||||||
if sticky:
|
if sticky:
|
||||||
self.window.stick()
|
self.window.stick()
|
||||||
|
if self.conf['always_on_top']:
|
||||||
|
self.window.set_keep_above(True)
|
||||||
self.window.connect('destroy', self.destroy_event)
|
self.window.connect('destroy', self.destroy_event)
|
||||||
|
|
||||||
self.label = gtk.Label('-')
|
self.label = gtk.Label('-')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user