terminatorrc isn't created by default, so it can be used to override the gnome-terminal profile as well as providing gconf independence for non-gnome users

This commit is contained in:
Chris Jones 2008-03-01 00:24:14 +00:00
parent 201e48c9be
commit 4b6094fbe5
1 changed files with 15 additions and 14 deletions

View File

@ -145,7 +145,7 @@ class TerminatorTerm:
if self.profile:
self.gconf_client.add_dir (self.profile, gconf.CLIENT_PRELOAD_RECURSIVE)
self.gconf_client.notify_add (self.profile, self.on_gconf_notification)
else:
if os.path.exists (pwd.getpwuid(os.getuid ())[5] + "/.terminatorrc"):
f = open (pwd.getpwuid (os.getuid ())[5] + "/.terminatorrc")
config = f.readlines ()
@ -153,11 +153,12 @@ class TerminatorTerm:
for line in config:
try:
line = line.split("#")[0]
line = line.strip ()
if line:
if line[0] == '#':
pass
elif line:
(key,value) = line.split ("=")
print >> sys.stderr, _('''Overriding setting '%s' from default value '%s' to: '%s' ''')%(key.strip (), self.defaults[key.strip ()], value.strip ())
print >> sys.stderr, _('''Overriding setting '%s' from value '%s' to: '%s' ''')%(key.strip (), self.defaults[key.strip ()], value.strip ())
self.defaults[key.strip ()] = value.strip ()
except:
pass