diff options
author | Ajay Garg <ajay@activitycentral.com> | 2012-03-02 13:52:18 (GMT) |
---|---|---|
committer | Anish Mangal <anish@activitycentral.com> | 2012-04-27 10:02:37 (GMT) |
commit | 860a0fd8d76f049dd0a13f6ac3dea6b8bb7416a0 (patch) | |
tree | f87d70256767e577a13e428bdf8d6315979c60b0 /src/jarabe/desktop/activitieslist.py | |
parent | ea54609156a5cce272fa95ef549658f68f147b99 (diff) |
sl#2818, au#589: Modifications in "favorite" status for activities in different workflows.
==============================================================================
Following scenarios have been tested :
1. Addition of new activity, via Software-Update ==>
It should be shown as a favorite as default.
2. Addition of new activity, via Manual-Addition in "~/Activities"
directory ==>
It should be shown as a favorite as default.
3. Upgrade of an existing activity, via Software-Update ==>
The 'favorite-status' of the new-version activity, should be the same
as the 'favorite-status' of the old-version activity.
4. Removal of an activity, via Manual-Deletion of ".activity" directory
in "~/Activities" folder ==>
The activity should be removed, so should be its "favoriteness", if
at all.
5. An activity should maintain its "favoriteness" (or none of it) upon multiple reboots.
================================================================================
Another note ::
Before applying this patch, I saw that there were multiple entries for the same activity
(but different versions) in "~/.sugar/default/favorite_activities" (I however, did not
note down the exact workflow as to when it happened).
Anyway, AFTER the applying of this patch, there is should be a maximum of one entry per
activity in this file (and that happens, when the activity is designated as a favorite,
obviously !!)
=================================================================================
Signed-off-by: Ajay Garg <ajay@sugarlabs.org>
Diffstat (limited to 'src/jarabe/desktop/activitieslist.py')
-rw-r--r-- | src/jarabe/desktop/activitieslist.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py index e34abd6..5f79090 100644 --- a/src/jarabe/desktop/activitieslist.py +++ b/src/jarabe/desktop/activitieslist.py @@ -135,7 +135,8 @@ class ActivitiesTreeView(gtk.TreeView): registry = bundleregistry.get_registry() registry.set_bundle_favorite(row[ListModel.COLUMN_BUNDLE_ID], row[ListModel.COLUMN_VERSION], - not row[ListModel.COLUMN_FAVORITE]) + not row[ListModel.COLUMN_FAVORITE], + True) def __icon_clicked_cb(self, cell, path): row = self.get_model()[path] @@ -447,7 +448,8 @@ class ActivityListPalette(ActivityPalette): registry = bundleregistry.get_registry() registry.set_bundle_favorite(self._bundle_id, self._version, - not self._favorite) + not self._favorite, + True) def __activity_changed_cb(self, activity_registry, activity_info): if activity_info.get_bundle_id() == self._bundle_id and \ |