diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-12-18 12:43:34 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2007-12-18 12:43:34 (GMT) |
commit | d35c19b6aaeb79df700bf063f4bf3d298c20bf7a (patch) | |
tree | 24c78ed32e5c4c7ceb4461914d1b808345c09d78 /lib/sugar/activity/registry.py | |
parent | b57ff156f7b1125e37c8295c7bb4984a84f7de7f (diff) |
Allow activity up- and downgrades #4906, also fix #5382
Diffstat (limited to 'lib/sugar/activity/registry.py')
-rw-r--r-- | lib/sugar/activity/registry.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/sugar/activity/registry.py b/lib/sugar/activity/registry.py index c21d4a5..ac672d5 100644 --- a/lib/sugar/activity/registry.py +++ b/lib/sugar/activity/registry.py @@ -29,15 +29,17 @@ def _activity_info_from_dict(info_dict): if not info_dict: return None return ActivityInfo(info_dict['name'], info_dict['icon'], - info_dict['bundle_id'], info_dict['path'], - info_dict['show_launcher'], info_dict['command']) + info_dict['bundle_id'], info_dict['version'], + info_dict['path'], info_dict['show_launcher'], + info_dict['command']) class ActivityInfo(object): - def __init__(self, name, icon, bundle_id, + def __init__(self, name, icon, bundle_id, version, path, show_launcher, command): self.name = name self.icon = icon self.bundle_id = bundle_id + self.version = version self.path = path self.command = command self.show_launcher = show_launcher @@ -146,6 +148,8 @@ class ActivityRegistry(gobject.GObject): self._mime_type_to_activities.clear() def remove_bundle(self, bundle_path): + self._service_name_to_activity_info.clear() + self._mime_type_to_activities.clear() return self._registry.RemoveBundle(bundle_path) def _activity_removed_cb(self, info_dict): |