From d150ac40cc3a6a22111131799528c8090a356ee1 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 29 Oct 2006 18:05:09 +0000 Subject: More work on bundles support --- (limited to 'shell') diff --git a/shell/model/ShellModel.py b/shell/model/ShellModel.py index cb8747b..350666d 100644 --- a/shell/model/ShellModel.py +++ b/shell/model/ShellModel.py @@ -15,6 +15,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA from sugar.presence import PresenceService +from sugar.activity.bundleregistry import BundleRegistry +from sugar import env from model.Friends import Friends from model.MeshModel import MeshModel from model.Owner import ShellOwner @@ -28,9 +30,16 @@ class ShellModel: self._owner = ShellOwner() self._owner.announce() + self._friends = Friends() self._mesh = MeshModel() + self._bundle_registry = BundleRegistry() + self._bundle_registry.add_search_path(env.get_bundles_path()) + + def get_bundle_registry(self): + return self._bundle_registry + def get_mesh(self): return self._mesh diff --git a/shell/view/frame/ActivitiesBox.py b/shell/view/frame/ActivitiesBox.py index 985ee8c..06f102c 100644 --- a/shell/view/frame/ActivitiesBox.py +++ b/shell/view/frame/ActivitiesBox.py @@ -55,14 +55,18 @@ class ActivitiesBox(hippo.CanvasBox): hippo.CanvasBox.__init__(self, orientation=hippo.ORIENTATION_HORIZONTAL) self._shell = shell + self._shell_model = self._shell.get_model() self._invite_to_item = {} - self._invites = self._shell.get_model().get_invites() + self._invites = self._shell_model.get_invites() registry = conf.get_activity_registry() for activity in registry.list_activities(): if activity.get_show_launcher(): self.add_activity(activity) + for bundle in self._shell_model.get_bundle_registry(): + self.add_activity(bundle) + for invite in self._invites: self.add_invite(invite) self._invites.connect('invite-added', self._invite_added_cb) -- cgit v0.9.1