Closed Bug 300250 Opened 19 years ago Closed 19 years ago

Clipboard functions (cut, copy, paste) don't work

Categories

(Calendar :: Sunbird Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jminta, Assigned: jminta)

References

Details

Attachments

(2 files)

The clipboard functions don't work at all.

Cut/Copy is still using an export function that asks for event.start, etc 
instead of event.startDate.

Paste is still trying to use parseIcalEvents which was replaced by parseIcal.  
However, unlike parseIcalEvents, parseIcal doesn't return an event array.  This 
can be worked around, but it might be worth changing, since clipboard needs to 
alter the events before they are added to the calendar.

One question comes to mind: When pasting multiple events, should they all be 
added to the selected day or should the earliest be added to the selected day, 
and the time difference between the events preserved?  Or give the user the 
option?
Blocks: 300424
Re: pasting times of single and multiple events

See patch and comments at bug 199422 comment 17.
FYI on other programs:
Outlook keeps the time difference between events when pasting.

Lotus Notes keeps the times of events, but places them all on the selected day.

Taking this annoying sucker.  It's mostly done in my tree.  Patch tomorrow probably.
Status: NEW → ASSIGNED
Attached patch full patch v1 β€” β€” Splinter Review
The whitespacing in the file was pretty bad, so this includes fixes to most of
it as well as getting the clipboard functions back working.
Assignee: mostafah → jminta
Attached patch patch v1 -w β€” β€” Splinter Review
Same as above but -w to hopefully help with the readability.
Attachment #192189 - Flags: first-review?(mvl)
Comment on attachment 192189 [details] [diff] [review]
patch v1 -w

>+    var icssrv = Components.classes["@mozilla.org/calendar/ics-service;1"]
>+                       .getService(Components.interfaces.calIICSService);
Nit: Align the dots. (Here, and in a few other places)

>+                if (item.startDate) 
>+                    date = item.startDate.clone();
>+                if (item.entryDate)
>+                    date = item.entryDate.clone();
>+                else if (item.dueDate)
>+                    date = item.dueDate.clone();

Are you sure the second if shouldn't be else if?
Also, add a newline to seperate this block from the next.

r=mvl with those.
Attachment #192189 - Flags: first-review?(mvl) → first-review+
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 278087 has been marked as a duplicate of this bug. ***
Blocks: 199422
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: