Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2009-11-27 11:34:59 (GMT)
committer Daniel Drake <dsd@laptop.org>2009-12-01 17:57:49 (GMT)
commitd7263450798944f74a8717b4ecb2701c45f6aac8 (patch)
treee42377e973e4843e68961375597808de2981c4da /bin
parentd009af187b13268df9d4760c4ed2d1a6fc11e6cc (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')
-rw-r--r--bin/sugar-session9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/sugar-session b/bin/sugar-session
index b4ab2c7..a086499 100644
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -130,10 +130,19 @@ def setup_file_transfer_cb():
from jarabe.model import filetransfer
filetransfer.init()
+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')
+ set_fonts()
+
intro.check_profile()
client = gconf.client_get_default()