set anti-aliasing even when vte is old and we are on RHEL5 or CentOS5

This commit is contained in:
Chris Jones 2011-09-23 21:37:20 +01:00
parent cc30c2de49
commit 7dc34e7eaf
1 changed files with 8 additions and 2 deletions

View File

@ -1337,9 +1337,15 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
"""Set the font we want in VTE""" """Set the font we want in VTE"""
antialias = self.config['antialias'] antialias = self.config['antialias']
if antialias: if antialias:
try:
antialias = vte.ANTI_ALIAS_FORCE_ENABLE antialias = vte.ANTI_ALIAS_FORCE_ENABLE
except AttributeError:
antialias = 1
else: else:
try:
antialias = vte.ANTI_ALIAS_FORCE_DISABLE antialias = vte.ANTI_ALIAS_FORCE_DISABLE
except AttributeError:
antialias = 2
self.vte.set_font_full(fontdesc, antialias) self.vte.set_font_full(fontdesc, antialias)
def get_cursor_position(self): def get_cursor_position(self):