diff options
author | Gonzalo Odiard <gonzalo@laptop.org> | 2012-09-04 08:31:28 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-09-07 09:14:25 (GMT) |
commit | 88c4b013341a6358f13e50619a1a6ef414683f1e (patch) | |
tree | f207eddbb554fc5ac197f3d1e4a92f8a9eb87929 /bin | |
parent | 26fcb0f82f23e03d25baec8a3adc14d2fdc89c68 (diff) |
Sugar Session: initialize the Sugar theme in sugar-session
We do the same initialization as we do in the activity
base class.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sugar-session | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/sugar-session b/bin/sugar-session index 4b22a77..055704d 100755 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -209,6 +209,16 @@ def set_fonts(): settings = Gtk.Settings.get_default() settings.set_property("gtk-font-name", "%s %f" % (face, size)) +def set_theme(): + settings = Gtk.Settings.get_default() + sugar_theme = 'sugar-72' + if 'SUGAR_SCALING' in os.environ: + if os.environ['SUGAR_SCALING'] == '100': + sugar_theme = 'sugar-100' + settings.set_property('gtk-theme-name', sugar_theme) + settings.set_property('gtk-icon-theme-name', 'sugar') + + def main(): try: from sugar import env @@ -245,6 +255,7 @@ def main(): os.environ['TZ'] = timezone set_fonts() + set_theme() # this must be added early, so that it executes and unfreezes the screen # even when we initially get blocked on the intro screen |