diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-29 18:05:09 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-29 18:05:09 (GMT) |
commit | d150ac40cc3a6a22111131799528c8090a356ee1 (patch) | |
tree | f7d19ac2fa7c662e9611e235898ee2514f988cb7 /shell | |
parent | 87274fd89f0c127f05cd34ad912b47a185c4b0e3 (diff) |
More work on bundles support
Diffstat (limited to 'shell')
-rw-r--r-- | shell/model/ShellModel.py | 9 | ||||
-rw-r--r-- | shell/view/frame/ActivitiesBox.py | 6 |
2 files changed, 14 insertions, 1 deletions
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) |