From 472ad50c6e058cd0b4195d9863fcb7429959d8c7 Mon Sep 17 00:00:00 2001 From: Tony Baker Date: Mon, 7 Feb 2011 23:17:46 -0500 Subject: [PATCH] Changed set_cursor_blinks() to set_cursor_blink_mode(), set_cursor_blinks is deprecated as of vte 0.17.1. Made change to set_color_cursor to fix Launchpad Bug# 700969. --- terminatorlib/terminal.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 3d5869c2..021610e5 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -603,7 +603,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'): @@ -663,7 +670,10 @@ 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 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') if self.config['force_no_bell'] == True: self.vte.set_audible_bell(False)