Refactor the bundle registry. Move it inside

the shell and expose the parts that should be
public to the shell dbus service.
This commit is contained in:
Marco Pesenti Gritti
2007-05-27 20:24:10 +02:00
parent 8c70ff2d86
commit 42fef182f4
15 changed files with 148 additions and 73 deletions
-6
View File
@@ -28,7 +28,6 @@ import gtk, gobject
from sugar.presence import presenceservice
from sugar.activity.activityservice import ActivityService
from sugar.activity import bundleregistry
from sugar.graphics.window import Window
from sugar.graphics.toolbox import Toolbox
from sugar.graphics.toolbutton import ToolButton
@@ -209,7 +208,6 @@ class Activity(Window, gtk.Container):
self.jobject = datastore.create()
self.jobject['title'] = '%s %s' % (get_bundle_name(), 'Activity')
self.jobject['activity'] = self.get_service_name()
self.jobject['icon'] = self._get_icon()
self.jobject['keep'] = '0'
self.jobject['buddies'] = ''
self.jobject['preview'] = ''
@@ -332,10 +330,6 @@ class Activity(Window, gtk.Container):
raise
self.destroy()
def _get_icon(self):
registry = bundleregistry.get_registry()
return registry.get_bundle(self.get_service_name()).get_icon()
def get_bundle_name():
"""Return the bundle name for the current process' bundle
"""