From 4af300ee1eb8a018512860c2e5d3bf8c4fcd7d38 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Sun, 2 Aug 2015 00:49:40 +0200 Subject: [PATCH] Fixes font lookups for people with unpopulated gconf database (i.e. KDE) --- terminatorlib/config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 87ed21e4..df3daa18 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -368,7 +368,10 @@ class Config(object): value = self.gconf.get( '/desktop/gnome/interface/font_name') - self.system_prop_font = value.get_string() + if value: + self.system_prop_font = value.get_string() + else: + self.system_prop_font = "Sans 10" self.gconf.notify_add( '/desktop/gnome/interface/font_name', self.on_gconf_notify) @@ -386,7 +389,10 @@ class Config(object): value = self.gconf.get( '/desktop/gnome/interface/monospace_font_name') - self.system_mono_font = value.get_string() + if value: + self.system_mono_font = value.get_string() + else: + self.system_mono_font = "Mono 10" self.gconf.notify_add( '/desktop/gnome/interface/monospace_font_name', self.on_gconf_notify)