Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xshell/sugar-shell6
-rwxr-xr-xsugar-emulator26
2 files changed, 4 insertions, 28 deletions
diff --git a/shell/sugar-shell b/shell/sugar-shell
index 277030d..24eb751 100755
--- a/shell/sugar-shell
+++ b/shell/sugar-shell
@@ -20,9 +20,6 @@ import sys
import os
from ConfigParser import ConfigParser
-if len(sys.argv) == 2:
- sys.path.insert(0, sys.argv[1])
-
import pygtk
pygtk.require('2.0')
import gtk
@@ -36,8 +33,7 @@ from sugar import TracebackUtils
logger.cleanup()
logger.start('shell')
-if len(sys.argv) == 1:
- sys.path.insert(0, env.get_shell_path())
+sys.path.insert(0, env.get_shell_path())
from view.Shell import Shell
from model.ShellModel import ShellModel
diff --git a/sugar-emulator b/sugar-emulator
index d31010d..09ebaa8 100755
--- a/sugar-emulator
+++ b/sugar-emulator
@@ -25,24 +25,12 @@ import gtk
os.environ['SUGAR_EMULATOR'] = 'yes'
-sourcedir = os.path.abspath(os.path.dirname(__file__))
-if os.path.isfile(os.path.join(sourcedir, 'sugar/__uninstalled__.py')):
- print 'Running sugar from ' + sourcedir + ' ...'
- sys.path.insert(0, sourcedir)
-else:
- print 'Running the installed sugar...'
- sourcedir = None
-
from sugar import env
-from sugar import util
from sugar.emulator import Emulator
import _sugar
if len(sys.argv) == 1:
- if sourcedir:
- program = os.path.join(sourcedir, 'shell/sugar-shell')
- else:
- program = 'sugar-shell'
+ program = 'sugar-shell'
else:
program = sys.argv[1]
@@ -54,18 +42,10 @@ else:
height = 900
dpi = min(_sugar.get_screen_dpi(), 96)
-
-if sourcedir:
- kbd_config = os.path.join(sourcedir, 'emulator/kbdconfig')
-else:
- kbd_config = os.path.join(env.get_emulator_path('kbdconfig'))
+kbd_config = os.path.join(env.get_emulator_path('kbdconfig'))
emulator = Emulator(width, height, dpi)
emulator.set_keyboard_config(kbd_config)
emulator.start()
-if sourcedir:
- program = os.path.join(sourcedir, program)
- os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program, sourcedir)
-else:
- os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program)
+os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program)