From 9683cc19d84e05f1cbe8d2e24b17e2d8ee42dc5a Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 05 Apr 2008 17:58:27 +0000 Subject: Use the sugar-xo theme only on the XO --- diff --git a/bin/sugar-shell.in b/bin/sugar-shell.in index 45a07dc..55a25a7 100644 --- a/bin/sugar-shell.in +++ b/bin/sugar-shell.in @@ -18,7 +18,12 @@ import os import sys -os.environ['GTK2_RC_FILES'] = '@prefix@/share/sugar/data/sugar-xo.gtkrc' +if os.environ.has_key('SUGAR_THEME'): + theme = os.environ['SUGAR_THEME'] +else: + theme = 'sugar' + +os.environ['GTK2_RC_FILES'] = '@prefix@/share/sugar/data/%s.gtkrc' % theme sys.path.insert(0, '@prefix@/share/sugar/shell') diff --git a/bin/sugar.in b/bin/sugar.in index fd85f7f..88e478a 100644 --- a/bin/sugar.in +++ b/bin/sugar.in @@ -1,5 +1,7 @@ #!/bin/sh +export SUGAR_THEME=sugar-xo + if [ -f /etc/olpc-security ] ; then exec dbus-launch --exit-with-session --config-file=/etc/dbus-1/session-olpc.conf sugar-shell else diff --git a/src/emulator.py b/src/emulator.py index 23ceea1..3a500d1 100755 --- a/src/emulator.py +++ b/src/emulator.py @@ -127,18 +127,10 @@ def main(): _start_xephyr() if options.xo_style: + os.environ['SUGAR_THEME'] = 'sugar-xo' os.environ['SUGAR_XO_STYLE'] = 'yes' else: os.environ['SUGAR_XO_STYLE'] = 'no' - - if options.xo_style: - gtkrc_filename = 'sugar-xo.gtkrc' - else: - gtkrc_filename = 'sugar.gtkrc' - os.environ['SUGAR_XO_STYLE'] = 'no' - - gtkrc_path = os.path.join(config.data_path, gtkrc_filename) - os.environ['GTK2_RC_FILES'] = gtkrc_path command = ['dbus-launch', 'dbus-launch', '--exit-with-session'] -- cgit v0.9.1