Closed
Bug 333375
Opened 18 years ago
Closed 18 years ago
Task tooltip displays priority as number and not as string value
Categories
(Calendar :: Sunbird Only, defect)
Calendar
Sunbird Only
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: ssitter, Assigned: jminta)
Details
Attachments
(1 file, 1 obsolete file)
3.05 KB,
patch
|
mvl
:
first-review+
|
Details | Diff | Splinter Review |
Task tooltip displays priority as number and not as string value Steps to Reproduce: 1. Create a task and set the priority to low, medium or high 2. Hover mouse pointer over task in Sunbirds task list and watch tooltip Actual Results: Tooltip shows the real priority value as internal stored, e.g. "Priority: 9" for low, "Priority: 5" for medium and "Priority: 1" for high. Expected Results: Tooltip should show the priority as string, e.g. "Priority: low". Open point: How to handle/display imported task with e.g. priority=3? Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060408 Mozilla Sunbird/0.3a1+ with new profile.
Assignee | ||
Comment 1•18 years ago
|
||
Patch converts the priority to High/Medium/Low strings in the same way that calendar-event-dialog does.
Comment 2•18 years ago
|
||
Comment on attachment 217786 [details] [diff] [review] more stringbundles >Index: calendar/resources/content/mouseoverPreviews.js >+ function getPriorityString(stringName) { >+ var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] >+ .getService(Components.interfaces.nsIStringBundleService); >+ var props = sbs.createBundle("chrome://calendar/locale/calendar.properties"); >+ return props.GetStringFromName(stringName); >+ } I don't see the need for a special function here. Move the initialization to before the if-blocks, and then use GetStringFromName instead of getPriorityString. >+ if (priorityInteger >= 1 && priorityInteger <= 4) { Can a priority ever be 0? >+ } else { >+ priorityString = getPriorityString('lowPriority'); // low priority calendar-event-dialog.js also has a 'no priority'. But you skipped that, and it ends up with low priority. In the end, it won't be a big deal, but we should try to be consistent.
Attachment #217786 -
Flags: first-review?(mvl) → first-review-
Assignee | ||
Comment 3•18 years ago
|
||
Now without the extra function declaration. Neither patch has the problem mentioned about 'Not Specified' priority tasks, since we check first to make sure that .priority is non-null and non-zero. Since previous versions never included the information in the tooltip if the priority was Not Specified, I've continued this behavior.
Attachment #217786 -
Attachment is obsolete: true
Attachment #218419 -
Flags: first-review?(mvl)
Comment 4•18 years ago
|
||
Comment on attachment 218419 [details] [diff] [review] more stringbundles v2 r=mvl
Attachment #218419 -
Flags: first-review?(mvl) → first-review+
Updated•18 years ago
|
Whiteboard: [needs landing]
Comment 5•18 years ago
|
||
patch checked in on trunk and MOZILLA_1_8_BRANCH
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Comment 6•17 years ago
|
||
verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060929 Sunbird/0.3
Status: RESOLVED → VERIFIED
Whiteboard: [litmus testcase wanted]
You need to log in
before you can comment on or make changes to this bug.
Description
•