Opened 12 years ago
Closed 10 years ago
#3342 closed defect (fixed)
Duplicate icons in favorites view
Reported by: | ajay_garg | Owned by: | |
---|---|---|---|
Priority: | Unspecified by Maintainer | Milestone: | Unspecified |
Component: | Sugar | Version: | Unspecified |
Severity: | Unspecified | Keywords: | olpc, dx3 |
Cc: | JerryV, m_anish | Distribution/OS: | Unspecified |
Bug Status: | Unconfirmed |
Description
This is to keep track of the ticket at olpc bug-tracker ::
http://dev.laptop.org/ticket/11373
Change History (5)
comment:1 Changed 12 years ago by ajay_garg
comment:2 Changed 12 years ago by ajay_garg
This has fixed with the patch for ticket sl#2818, at
http://patchwork.sugarlabs.org/patch/1214/
and commit at:
http://git.sugarlabs.org/dextrose/mainline/commit/2c78ee35e184907b0c63bbc56316fedd36aa8fc3
The section of the code, that fixes this particular ticket (3342 that is) is :
=============================================================================
104 diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
105 index e9c87ea..d91610b 100644
106 --- a/src/jarabe/desktop/favoritesview.py
107 +++ b/src/jarabe/desktop/favoritesview.py
108 @@ -142,11 +142,17 @@ class FavoritesView(hippo.Canvas):
109 def _add_activity(self, activity_info):
110 if activity_info.get_bundle_id() == 'org.laptop.JournalActivity':
111 return
112 - icon = ActivityIcon(activity_info)
113 - icon.props.size = style.STANDARD_ICON_SIZE
114 - icon.set_resume_mode(self._resume_mode)
115 - self._box.insert_sorted(icon, 0, self._layout.compare_activities)
116 - self._layout.append(icon)
117 +
118 + # Add icon, if not already present (for the same combination of
119 + # activity-id and activity-version)
120 + icon = self._find_activity_icon(activity_info.get_bundle_id(),
121 + activity_info.get_activity_version())
122 + if icon is None:
123 + icon = ActivityIcon(activity_info)
124 + icon.props.size = style.STANDARD_ICON_SIZE
125 + icon.set_resume_mode(self._resume_mode)
126 + self._box.insert_sorted(icon, 0, self._layout.compare_activities)
127 + self._layout.append(icon)
128
129 def activity_added_cb(self, activity_registry, activity_info):
130 registry = bundleregistry.get_registry()
=============================================================================
comment:4 Changed 10 years ago by JerryV
- Cc JerryV added; jerryV removed
related ticket http://bugs.sugarlabs.org/ticket/3707
comment:5 Changed 10 years ago by dnarvaez
- Resolution set to fixed
- Status changed from new to closed
Probably fixed by dsd improvements.
Pardon me.. forgot to thank Jerry Vonau. Thanks Jerry for the motivation.