Closed Bug 377579 Opened 17 years ago Closed 17 years ago

Color stays in view when deselecting 'use color' in sunbird.

Categories

(Calendar :: Calendar Frontend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4pre) Gecko/20070415 Calendar/0.5pre

Steps:
* Set a color for a category
* Create an event with this category.
* Remove the color from the category.

Result:
* The colored border stays, even if the view is refreshed.
Attached patch Fix getPrefSafe β€” β€” Splinter Review
I have tracked down the Problem.

* getPrefSafe throws NS_ERROR_UNEXPECTED in [1], the rule is never deleted.
* nsIPrefBranch::clearUserPref() [2] says it will delete the preference if there is no default value, but it doesn't until you restart the application. The preference stays with a null default value, which throws the above NS_ERROR.
* The issue is fixed on trunk in bug 193332. This means we need to work around it.
* The attached patch should function as a workaround.

[1] http://mxr.mozilla.org/mozilla1.8/source/calendar/base/content/calendar-views.js#316
[2] http://mxr.mozilla.org/mozilla1.8/source/modules/libpref/public/nsIPrefBranch.idl#209
Assignee: nobody → bugzilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #261664 - Flags: first-review?(jminta)
Comment on attachment 261664 [details] [diff] [review]
Fix getPrefSafe

See also bug 340229.
Attachment #261664 - Flags: first-review?(jminta) → first-review+
This bug is rather visible and the patch is quite harmless. Therefore, I'm requesting blocking.
Flags: blocking-calendar0.5?
The fix in this patch is the same as in Bug 372626.
This can be checked in, as per the conference call.
Flags: blocking-calendar0.5? → blocking-calendar0.5+
Checked in on MOZILLA_1_8_BRANCH and HEAD.

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
OS: Windows 2000 → All
Hardware: PC → All
Resolution: --- → FIXED
verified on Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4pre) Gecko/20070426 Calendar/0.5pre
Status: RESOLVED → VERIFIED
Litmus testcase 2625 created
Flags: blocking-calendar0.5+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: