diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-06-18 13:04:05 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-06-18 13:04:05 (GMT) |
commit | 92a841e0cd4dc3d0d7969a1446a0d8c012b80989 (patch) | |
tree | 69250cebb68cfc444dc32742630421239ebe82d0 | |
parent | ed5d1f8ca378c484ba42702cda8041b543a09064 (diff) |
Set fonts with the sugar settings
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | activity.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activity.py b/activity.py index 6a757b3..27ffa17 100644 --- a/activity.py +++ b/activity.py @@ -21,6 +21,7 @@ import gettext import gtk import gobject +import gconf from sugar.activity import activity from sugar.graphics.toolbarbox import ToolbarBox @@ -231,7 +232,16 @@ class ImageCollectionViewer(gtk.VBox): return POWERD_INHIBIT_DIR + "/%u" % os.getpid() +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(): + set_fonts() win = gtk.Window() image_viewer = ImageCollectionViewer() win.add(image_viewer) |