Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-31 11:06:28 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-31 11:06:28 (GMT)
commitcb285aba06dea2c2155522f5eeb74a793d96868c (patch)
treedd30bd19995504747eda9b715cbce0453a1c0319 /shell
parent92f37d31da17cb8e19295e62584ee58e88c83a77 (diff)
Get running activities to work. Still hacky.
Diffstat (limited to 'shell')
-rwxr-xr-xshell/sugar-activity-factory3
-rw-r--r--shell/view/ActivityHost.py8
-rw-r--r--shell/view/Shell.py2
3 files changed, 11 insertions, 2 deletions
diff --git a/shell/sugar-activity-factory b/shell/sugar-activity-factory
index 66a9f07..4f4ba0d 100755
--- a/shell/sugar-activity-factory
+++ b/shell/sugar-activity-factory
@@ -41,6 +41,9 @@ logger.start(sys.argv[1])
logging.info('Starting activity factory %s' % sys.argv[1])
+if len(sys.argv) > 3:
+ sys.path.append(sys.argv[3])
+
ActivityFactory.register_factory(sys.argv[1], sys.argv[2])
gtk.main()
diff --git a/shell/view/ActivityHost.py b/shell/view/ActivityHost.py
index 61b7078..ceeeeed 100644
--- a/shell/view/ActivityHost.py
+++ b/shell/view/ActivityHost.py
@@ -42,7 +42,7 @@ class ActivityChatWindow(gtk.Window):
self.add(chat_widget)
class ActivityHost:
- def __init__(self, window):
+ def __init__(self, shell_model, window):
self._window = window
self._xid = window.get_xid()
self._pservice = PresenceService.get_instance()
@@ -56,8 +56,14 @@ class ActivityHost:
self._type = self._activity.get_type()
self._gdk_window = gtk.gdk.window_foreign_new(self._xid)
+ # FIXME Old activity registry support, cleanup
registry = conf.get_activity_registry()
info = registry.get_activity(self._type)
+
+ if not info:
+ registry = shell_model.get_bundle_registry()
+ info = registry.get_bundle(self._type)
+
self._icon_name = info.get_icon()
try:
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index deaa889..401c935 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -96,7 +96,7 @@ class Shell(gobject.GObject):
def __window_opened_cb(self, screen, window):
if window.get_window_type() == wnck.WINDOW_NORMAL:
- activity_host = ActivityHost(window)
+ activity_host = ActivityHost(self.get_model(), window)
self._hosts[activity_host.get_xid()] = activity_host
self.emit('activity-opened', activity_host)