Closed Bug 482116 Opened 15 years ago Closed 15 years ago

Views are not updated after changing category color, restart required

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: Fallen)

References

Details

(Keywords: regression)

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4pre) Gecko/20090307 Calendar/1.0pre

Views are not updated after changing category color, restart required

Steps to Reproduce:
1. go to preference dialog and assign colors to categories
2. create events with that categories applied
3. go to preference dialog and change colors of the categories
4. check views

Actual Results:
The view refreshes but still shows the old categories colors. An application restart is required to take over the changes.

Expected Results:
The view refreshes and shows the new categories colors.

This used to work for both normal and escaped category names (see below) in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090226 Calendar/1.0pre.
category "Birthday" -> preference "calendar.category.color.birthday"
category "Fußball"  -> preference "calendar.category.color.fu-uxdf-ball"
I think this is another regression from Bug 475715.
Blocks: 475715
Assignee: nobody → philipp
Flags: blocking-calendar1.0+
Attached patch Fix - v1Splinter Review
I didn't know until now that observes on pref branches only live as long as the branch object is alive (core bug). This works around.
Attachment #366203 - Flags: review?(ssitter)
Attachment #366203 - Flags: review?(ssitter) → review+
Comment on attachment 366203 [details] [diff] [review]
Fix - v1

Do you need to change cleanupCategories() too? It creates another categoryPrefBranch object. Maybe the global object should be renamed to gCategoryPrefBranch? r=ssitter with that answered.
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: x86 → All
Yes, I changed cleanupCategories() now, thanks. I'd rather keep the name since it looks nice aligned to categoryManagement and I think its ok since the global and its use are quite close together.

Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/ff23375fcbda>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.