diff options
author | Daniel Drake <dsd@laptop.org> | 2009-11-27 11:34:59 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2009-12-01 16:48:55 (GMT) |
commit | 96bbf75d78c64ec51350db752997d48dd0e47ca9 (patch) | |
tree | a66d1f1ab703fc4259e9d2553b1a382d0d42aea3 /bin/sugar-session | |
parent | 225476d024c6c0d3403855f319cf2d969af372c9 (diff) |
Configure fonts through GConf (#1584)
Sugar currently configures fonts through gtkrc and through the
sugar.graphics.style class, both of which are hard to modify by
implementors/deployers.
Move this into GConf and apply these settings to the sugar shell
at startup.
In the longer term, Sayamindu's efforts to create a settings manager
will build on this work.
Diffstat (limited to 'bin/sugar-session')
-rw-r--r-- | bin/sugar-session | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/sugar-session b/bin/sugar-session index f06479d..ef22db0 100644 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -207,6 +207,13 @@ def bootstrap(): if sys.modules.has_key('xklavier'): gobject.idle_add(setup_keyboard_cb) +def set_fonts(): + client = gconf.client_get_default() + face = client.get_string('/desktop/sugar/font/default_face') + size = client.get_float('/desktop/sugar/font/default_size') + settings = gtk.settings_get_default() + settings.set_property("gtk-font-name", "%s %f" % (face, size)) + def main(): cleanup_logs() logger.start('shell') @@ -219,6 +226,8 @@ def main(): if timezone is not None and timezone: os.environ['TZ'] = timezone + set_fonts() + intro.check_profile() start_ui_service() |