From 6bdda4790178f04c56bd4a7163b8a7e062a0724f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 1 Dec 2006 22:22:09 +0100 Subject: [PATCH] Since service name and bundle id corrisponds, there is no need to query the register anymore. --- shell/view/home/MeshBox.py | 7 ++----- sugar/activity/bundle.py | 4 ---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py index e2aad35b..1c61d1ab 100644 --- a/shell/view/home/MeshBox.py +++ b/shell/view/home/MeshBox.py @@ -23,7 +23,6 @@ from sugar.graphics.spreadbox import SpreadBox from sugar.graphics.snowflakebox import SnowflakeBox from sugar.graphics.canvasicon import CanvasIcon from view.BuddyIcon import BuddyIcon -import conf class ActivityView(SnowflakeBox): def __init__(self, shell, menu_shell, model): @@ -52,10 +51,8 @@ class ActivityView(SnowflakeBox): del self._icons[name] def _clicked_cb(self, item): - registry = conf.get_activity_registry() - default_type = self._model.get_service().get_type() - bundle = registry.get_activity_from_type(default_type) - self._shell.join_activity(bundle.get_id(), self._model.get_id()) + bundle_id = self._model.get_service().get_type() + self._shell.join_activity(bundle_id, self._model.get_id()) class MeshBox(SpreadBox): def __init__(self, shell, menu_shell): diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py index f0dc2f6f..f9263a3d 100644 --- a/sugar/activity/bundle.py +++ b/sugar/activity/bundle.py @@ -84,7 +84,3 @@ class Bundle: def get_show_launcher(self): """Get whether there should be a visible launcher for the activity""" return self._show_launcher - - # Compatibility with the old activity registry, remove after BTest-1 - def get_id(self): - return self._service_name