Closed
Bug 362930
Opened 19 years ago
Closed 19 years ago
Selected calendar will not be restored after restart
Categories
(Calendar :: Calendar Frontend, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: frank.loehmann, Assigned: thomas.benisch)
References
Details
Attachments
(2 files)
|
3.34 KB,
patch
|
mattwillis
:
first-review+
|
Details | Diff | Splinter Review |
|
2.26 KB,
patch
|
mattwillis
:
first-review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1) Gecko/20061010 Firefox/2.0
The selected calendar is used to create new events by default.
Lightning creates a local default calendar. If the user creates a new calendar (i.e. linked to a network) and selects this calendar after creating it, this calendar selection will not be remembered/restored if Lightning gets restarted. Thus new created events are going to the wrong calendar.
Proposed solution: Restoring the latest selection in the calendar tab would solve this problem.
Reproducible: Always
Steps to Reproduce:
1. Install Lightning
2. Create calendar from network (i.e. WCAP)
3. Select the new calendar
4. Close Thunderbird/Lightning
5. Start Thunderbird/Lightning
Actual Results:
First calendar gets selected after restart.
Comment 1•19 years ago
|
||
I'll pre-emptively give a ui-review+ to a patch that does what's described here, since it makes the calendar act more like a physical object.
| Assignee | ||
Comment 2•19 years ago
|
||
*** Bug 363432 has been marked as a duplicate of this bug. ***
| Assignee | ||
Updated•19 years ago
|
Assignee: nobody → thomas.benisch
| Assignee | ||
Comment 3•19 years ago
|
||
This patch selects the stored default calendar in the calendar tab list
right after application start.
Attachment #248253 -
Flags: first-review?(lilmatt)
Comment 4•19 years ago
|
||
Comment on attachment 248253 [details] [diff] [review]
select default calendar patch
>+function getIndexForCalendar(calendar) {
Please use aCalendar here...
>+ // Special trick to compare interface pointers, since normal, ==
>+ // comparison can fail due to javascript wrapping.
>+ var sip = Components.classes["@mozilla.org/supports-interface-pointer;1"]
>+ .createInstance(Components.interfaces.nsISupportsInterfacePointer);
>+ sip.data = calendar;
...and here.
r=lilmatt
I would love a similar patch for Sunbird
Attachment #248253 -
Flags: first-review?(lilmatt) → first-review+
| Assignee | ||
Comment 5•19 years ago
|
||
This patch selects the stored default calendar in the Sunbird calendar list
right after application start.
Attachment #248504 -
Flags: first-review?(lilmatt)
Comment 6•19 years ago
|
||
Comment on attachment 248504 [details] [diff] [review]
Sunbird select default calendar patch
>+++ mozilla/calendar/resources/content/calendarManagement.js 2006-12-13 12:37:04.625000000 > calendarList.appendChild(listItem);
> }
>+ // Ensure that a calendar is selected in calendar list after startup.
>+ if (!oldSelection || oldSelection < 0) {
>+ var defaultCalendar = composite.defaultCalendar;
>+ var item = defaultCalendar ? getListItem(defaultCalendar) : null;
>+ oldSelection = item ? calendarList.getIndexOfItem(item) : 0;
>+ }
>+ if (oldSelection >= calendars.length) {
>+ oldSelection = calendars.length-1;
>+ }
> calendarList.selectedIndex = oldSelection;
Please put a blank line on either side of what you added for increased readability.
Otherwise, r=lilmatt
Attachment #248504 -
Flags: first-review?(lilmatt) → first-review+
| Assignee | ||
Comment 7•19 years ago
|
||
patch checked in on HEAD and MOZILLA_1_8_BRANCH
| Assignee | ||
Updated•19 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Summary: Selected calendar will not be restored after restart of Lightning → Selected calendar will not be restored after restart
Comment 8•19 years ago
|
||
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061215 Calendar/0.4a1
Status: RESOLVED → VERIFIED
Whiteboard: [litmus testcase wanted]
You need to log in
before you can comment on or make changes to this bug.
Description
•