Since service name and bundle id corrisponds, there
is no need to query the register anymore.
This commit is contained in:
parent
833e7633e9
commit
6bdda47901
@ -23,7 +23,6 @@ from sugar.graphics.spreadbox import SpreadBox
|
|||||||
from sugar.graphics.snowflakebox import SnowflakeBox
|
from sugar.graphics.snowflakebox import SnowflakeBox
|
||||||
from sugar.graphics.canvasicon import CanvasIcon
|
from sugar.graphics.canvasicon import CanvasIcon
|
||||||
from view.BuddyIcon import BuddyIcon
|
from view.BuddyIcon import BuddyIcon
|
||||||
import conf
|
|
||||||
|
|
||||||
class ActivityView(SnowflakeBox):
|
class ActivityView(SnowflakeBox):
|
||||||
def __init__(self, shell, menu_shell, model):
|
def __init__(self, shell, menu_shell, model):
|
||||||
@ -52,10 +51,8 @@ class ActivityView(SnowflakeBox):
|
|||||||
del self._icons[name]
|
del self._icons[name]
|
||||||
|
|
||||||
def _clicked_cb(self, item):
|
def _clicked_cb(self, item):
|
||||||
registry = conf.get_activity_registry()
|
bundle_id = self._model.get_service().get_type()
|
||||||
default_type = self._model.get_service().get_type()
|
self._shell.join_activity(bundle_id, self._model.get_id())
|
||||||
bundle = registry.get_activity_from_type(default_type)
|
|
||||||
self._shell.join_activity(bundle.get_id(), self._model.get_id())
|
|
||||||
|
|
||||||
class MeshBox(SpreadBox):
|
class MeshBox(SpreadBox):
|
||||||
def __init__(self, shell, menu_shell):
|
def __init__(self, shell, menu_shell):
|
||||||
|
@ -84,7 +84,3 @@ class Bundle:
|
|||||||
def get_show_launcher(self):
|
def get_show_launcher(self):
|
||||||
"""Get whether there should be a visible launcher for the activity"""
|
"""Get whether there should be a visible launcher for the activity"""
|
||||||
return self._show_launcher
|
return self._show_launcher
|
||||||
|
|
||||||
# Compatibility with the old activity registry, remove after BTest-1
|
|
||||||
def get_id(self):
|
|
||||||
return self._service_name
|
|
||||||
|
Loading…
Reference in New Issue
Block a user