diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-12 20:17:57 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-07-12 20:17:57 (GMT) |
commit | 2bbedf988b39c5af35777954444ba54ceba13ecb (patch) | |
tree | f3607f074de03e6774a9e8963d485ea4db7dcc1c /shell/Session.py | |
parent | d12b780074b05b0abcaf6b3877a9a4047c6e0d0e (diff) |
Fix a bunch of bugs, more cleanups
Diffstat (limited to 'shell/Session.py')
-rw-r--r-- | shell/Session.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/shell/Session.py b/shell/Session.py index 93f4b1f..2aeb044 100644 --- a/shell/Session.py +++ b/shell/Session.py @@ -1,9 +1,10 @@ import os import gtk -import sugar.theme +import gobject from Shell import Shell from Process import Process +import sugar.theme class ActivityProcess(Process): def __init__(self, module): @@ -21,8 +22,12 @@ class DbusProcess(Process): return 'Dbus' def start(self): - Process.start(self) - + args = self._command.split() + flags = gobject.SPAWN_SEARCH_PATH + result = gobject.spawn_async(args, flags=flags, standard_output=True, + standard_error=True) + self._stdout = result[2] + dbus_file = os.fdopen(self._stdout) addr = dbus_file.readline() addr = addr.strip() @@ -42,9 +47,6 @@ class Session: def __init__(self): sugar.theme.setup() - self._shell = Shell() - self._shell.start() - def start(self): """Start the session""" process = DbusProcess() @@ -52,8 +54,11 @@ class Session: process = MatchboxProcess() process.start() + + shell = Shell() + shell.start() - registry = self._shell.get_registry() + registry = shell.get_registry() for activity_module in registry.list_activities(): process = ActivityProcess(activity_module) process.start() |