diff options
author | Ajay Garg <ajay@activitycentral.com> | 2012-07-24 09:26:16 (GMT) |
---|---|---|
committer | Ajay Garg <ajay@activitycentral.com> | 2012-07-24 09:26:16 (GMT) |
commit | ad3897946e013f1ff4020aeab35375ccb122758b (patch) | |
tree | 3c18f7f499e836b60f38134ef68c7079a5495e2f | |
parent | 80efb33d9caed8c6ae3afee7c7794790847fc8d1 (diff) |
Multi-Select REVIEW: Fix the issue, wherein the favorite-status-changes were not reflected on the UI, while in multi-select mode.
-rw-r--r-- | rpms/sugar/0111-Multi-Select-Fix-the-issue-wherein-the-favorite-stat.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/rpms/sugar/0111-Multi-Select-Fix-the-issue-wherein-the-favorite-stat.patch b/rpms/sugar/0111-Multi-Select-Fix-the-issue-wherein-the-favorite-stat.patch new file mode 100644 index 0000000..b028d6d --- /dev/null +++ b/rpms/sugar/0111-Multi-Select-Fix-the-issue-wherein-the-favorite-stat.patch @@ -0,0 +1,48 @@ +From 457b723925c0cd0911091a2f796fe7af0c54dc57 Mon Sep 17 00:00:00 2001 +From: Ajay Garg <ajay@activitycentral.com> +Date: Tue, 24 Jul 2012 12:44:45 +0530 +Subject: [PATCH 2/2] Multi-Select: Fix the issue, wherein the + favorite-status-changes were not being reflected on the + UI, while in multi-select mode. +Organization: Sugar Labs Foundation +Signed-off-by: Ajay Garg <ajay@activitycentral.com> +--- + + + src/jarabe/journal/listview.py | 20 ++++++++++++++++++-- + 1 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py +index 10f468f..a08b71d 100644 +--- a/src/jarabe/journal/listview.py ++++ b/src/jarabe/journal/listview.py +@@ -302,8 +302,24 @@ class BaseListView(gtk.Bin): + cell.props.icon_name = 'emblem-unchecked' + + def __favorite_set_data_cb(self, column, cell, tree_model, tree_iter): +- favorite = tree_model[tree_iter][ListModel.COLUMN_FAVORITE] +- if favorite: ++ # Instead of querying the favorite-status from the "cached" ++ # entries in listmodel, hit the DS, and retrieve the persisted ++ # favorite-status. ++ # This solves the issue in "Multi-Select", wherein the ++ # listview is inhibited from refreshing. Now, if the user ++ # clicks favorite-star-icon(s), the change(s) is(are) written ++ # to the DS, but no refresh takes place. Thus, in order to have ++ # the change(s) reflected on the UI, we need to hit the DS for ++ # querying the favorite-status (instead of relying on the ++ # cached-listmodel. ++ uid = tree_model[tree_iter][ListModel.COLUMN_UID] ++ if uid is None: ++ return ++ ++ metadata = model.get(uid) ++ favorite = metadata['keep'] ++ ++ if favorite == '1': + client = gconf.client_get_default() + color = XoColor(client.get_string('/desktop/sugar/user/color')) + cell.props.xo_color = color +-- +1.7.4.4 + |