Fixes font lookups for people with unpopulated gconf database (i.e. KDE)

This commit is contained in:
Stephen Boddy 2015-08-02 00:49:40 +02:00
parent d8228434e9
commit 4af300ee1e
1 changed files with 8 additions and 2 deletions

View File

@ -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)