From 476e88934506e01542e2d19b09d5e9858e43bc2d Mon Sep 17 00:00:00 2001 From: Emmanuel Bretelle Date: Thu, 15 May 2008 17:03:57 +0100 Subject: [PATCH] Added a specific config rule for active_encodings --- terminatorconfig.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/terminatorconfig.py b/terminatorconfig.py index 337b7ed2..f7a8f82d 100755 --- a/terminatorconfig.py +++ b/terminatorconfig.py @@ -111,7 +111,7 @@ class TerminatorConfValuestore: 'http_proxy' : '', 'ignore_hosts' : ['localhost','127.0.0.0/8','*.local'], 'encoding' : 'UTF-8', - 'active_encodings' : ['UTF-8', 'ISO-8859-1'], + 'active_encodings' : ['UTF-8', 'ISO-8859-1', 'UTF-16'], } def __getattr__ (self, keyname): @@ -171,6 +171,10 @@ class TerminatorConfValuestoreGConf (TerminatorConfValuestore): profile = self.client.get_string (self._gt_dir + '/global/default_profile') profiles = self.client.get_list (self._gt_dir + '/global/profile_list','string') + #set up the active encoding list + self.active_encodings = self.client.get_list (self._gt_dir + '/global/active_encodings', 'string') + + #need to handle the list of Gconf.value if profile in profiles: dbg (" VSGConf: Found profile '%s' in profile_list"%profile) self.profile = '%s/%s'%(self._profile_dir, profile) @@ -236,8 +240,6 @@ class TerminatorConfValuestoreGConf (TerminatorConfValuestore): value = 'http://%s:%s/'%( self.client.get_string ('/system/http_proxy/host'), self.client.get_int ('/system/http_proxy/port')) - elif key == 'active_encodings': - value = self.client.get_list (self._gt_dir + '/global/active_encodings', 'string') else: value = self.client.get ('%s/%s'%(self.profile, key))