Fix cursor blink/colour issues (Tony Baker)

This commit is contained in:
Chris Jones 2011-08-20 16:51:30 +01:00
commit 8ba7213409
2 changed files with 16 additions and 2 deletions

View File

@ -6,6 +6,7 @@ terminator 0.96:
* Optimise various low level components so they are dramatically
faster (Stephen Boddy)
* Fix various bugs (Stephen Boddy)
* Fix cursor colours (#700969) and a cursor blink issue (Tony Baker)
terminator 0.95:
* Add a configuration option to enable a DBus server

View File

@ -605,7 +605,14 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
if color:
palette.append(gtk.gdk.color_parse(color))
self.vte.set_colors(fgcolor, bgcolor, palette)
if self.config['cursor_color'] != '':
if self.config['cursor_color'] == self.config['foreground_color']:
try:
self.vte.set_color_cursor(None)
except TypeError:
# FIXME: I think this is only necessary because of
# https://bugzilla.gnome.org/show_bug.cgi?id=614910
pass
elif self.config['cursor_color'] != '':
self.vte.set_color_cursor(gtk.gdk.color_parse(
self.config['cursor_color']))
if hasattr(self.vte, 'set_cursor_shape'):
@ -665,7 +672,13 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
dbg('setting background_transparent=False')
self.vte.set_background_transparent(False)
self.vte.set_cursor_blinks(self.config['cursor_blink'])
if hasattr(vte, 'VVVVTE_CURSOR_BLINK_ON'):
if self.config['cursor_blink'] == True:
self.vte.set_cursor_blink_mode('VTE_CURSOR_BLINK_ON')
else:
self.vte.set_cursor_blink_mode('VTE_CURSOR_BLINK_OFF')
else:
self.vte.set_cursor_blinks(self.config['cursor_blink'])
if self.config['force_no_bell'] == True:
self.vte.set_audible_bell(False)