Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/Shell.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-08-09 13:53:10 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-08-09 13:53:10 (GMT)
commit95d9b7fe8e7cbde413ef5f937cc1dda2b7fa8813 (patch)
tree733abfdda232625b72d52cc92929fc8d78ff5696 /shell/Shell.py
parenta9a65f42dfe4f0ca4eb7c916ec4afc9b3e376c69 (diff)
More work on the chat. Fix terminal api
Diffstat (limited to 'shell/Shell.py')
-rwxr-xr-xshell/Shell.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/shell/Shell.py b/shell/Shell.py
index 55b8902..a239809 100755
--- a/shell/Shell.py
+++ b/shell/Shell.py
@@ -15,7 +15,7 @@ from ConsoleWindow import ConsoleWindow
from Owner import ShellOwner
from sugar.presence.PresenceService import PresenceService
from ActivityHost import ActivityHost
-from ChatListener import ChatListener
+from ChatController import ChatController
from sugar.activity import ActivityFactory
class ShellDbusService(dbus.service.Object):
@@ -62,8 +62,8 @@ class Shell:
self._owner = ShellOwner()
self._owner.announce()
- chat_listener = ChatListener()
- chat_listener.start()
+ chat_controller = ChatController(self)
+ chat_controller.listen()
self._home_window = HomeWindow(self)
self._home_window.show()
@@ -81,6 +81,12 @@ class Shell:
xid = window.get_xid()
self._hosts[xid] = None
+ def get_activity(self, activity_id):
+ for host in self._hosts:
+ if host.get_id() == activity_id:
+ return host
+ return None
+
def get_current_activity(self):
window = self._screen.get_active_window()
if window:
@@ -135,7 +141,10 @@ class Shell:
activity = ActivityFactory.create(activity_name)
info = self._registry.get_activity_from_id(activity_name)
if info:
- activity.set_default_type(info.get_default_type())
+ default_type = info.get_default_type()
+ if default_type != None:
+ activity.set_default_type(default_type)
+ activity.execute('test', [])
return activity
else:
logging.error('No such activity in the directory')