Closed Bug 379097 Opened 17 years ago Closed 15 years ago

export should default to ics

Categories

(Calendar :: Import and Export, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bvdbos, Assigned: aryx)

Details

Attachments

(1 file, 1 obsolete file)

When exporting a calendar or selection of events the default extension should be ics. In import-export.js, in the function saveEventsToFile it is stated that
fp.defaultExtension = "ics";

which doesn't work.
defaultExtension means: "The extension that should be associated with files of the type we want to work with. On some platforms, this extension will be automatically appended to filenames the user enters, if needed." (from http://mxr.mozilla.org/seamonkey/source/widget/public/nsIFilePicker.idl#104)

So, this isn't the cause. I think there is no real default setting, but the order in which the category manager returns the exporters is crucial. The for-loop at http://mxr.mozilla.org/seamonkey/source/calendar/base/content/import-export.js#256 defines the elements in the dropdown and the first is always the default.
Attached patch Makes .ics default (obsolete) — Splinter Review
This makes ics default in the filepicker, I realize it might be too ugly for such a trivial problem though, but I figured I'd post it anyway and see what you guys think.
Attachment #264356 - Flags: review?(jminta)
Comment on attachment 264356 [details] [diff] [review]
Makes .ics default

I am not longer a calendar peer, and, as such, you should find another person to request review from.  In passing, I'll note that I'd be curious about the way the category-manager defines the order in which results are enumerated.  If we can determine what this is, we should be able to alter things in terms of registration, rather than special-casing ICS.

Canceling review request.
Attachment #264356 - Flags: review?(jminta)
(In reply to comment #2)
Robin, could you please provide an updated status on your patch and test with the latest trunk / 0.8pre nightly builds?

Attached patch patch v2Splinter Review
Proposed patch. The indentation seemed already inconsistent if you compare some parts of the file. Please correct this, approve and check in.
Assignee: nobody → archaeopteryx
Attachment #264356 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #361257 - Flags: review?(philipp)
Attachment #361257 - Flags: review?(philipp) → review+
Comment on attachment 361257 [details] [diff] [review]
patch v2

Fixed, also changed some vars to lets. r=philipp
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/a69b461c99d2>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
OS: Windows XP → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → 1.0
With the latest trunk builds of Tb & Lightning, I do get ICS as the default export format for both my local and my CalDAV calendars.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090215 Lightning/1.0pre Shredder/3.0b2pre
Status: RESOLVED → VERIFIED
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.