Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-06-07 12:57:33 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-06-07 12:57:33 (GMT)
commitde753f34de3872d817663a31f39ad9df663d3563 (patch)
tree55c26ee845971e354b8a082827650f461aa571a5
parent880620e9c2ebeda1002f2e82f88b637afc3626fd (diff)
Fix listening for removal of activities
-rw-r--r--src/jarabe/desktop/activitieslist.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py
index 06c0723..c9a2465 100644
--- a/src/jarabe/desktop/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -162,21 +162,26 @@ class ActivitiesModel(gtk.ListStore):
return
def __activity_removed_cb(self, activity_registry, activity_info):
- for entry in self._box.get_children():
- if entry.get_bundle_id() == activity_info.get_bundle_id() and \
- entry.get_version() == activity_info.get_activity_version():
- self._box.remove(entry)
+ bundle_id = activity_info.get_bundle_id()
+ version = activity_info.get_activity_version()
+ favorite = activity_registry.is_bundle_favorite(bundle_id, version)
+ for row in self:
+ if row[ActivitiesModel.COLUMN_BUNDLE_ID] == bundle_id and \
+ row[ActivitiesModel.COLUMN_VERSION] == version:
+ self.remove(row.iter)
return
def _add_activity(self, activity_info):
if activity_info.get_bundle_id() == 'org.laptop.JournalActivity':
return
- registry = bundleregistry.get_registry()
timestamp = activity_info.get_installation_time()
version = activity_info.get_activity_version()
+
+ registry = bundleregistry.get_registry()
favorite = registry.is_bundle_favorite(activity_info.get_bundle_id(),
version)
+
self.append([activity_info.get_bundle_id(),
favorite,
activity_info.get_icon(),