Closed Bug 463060 Opened 16 years ago Closed 16 years ago

Clean-up and move clipboard.js

Categories

(Calendar :: General, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mschroeder, Assigned: mschroeder)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch v1 (obsolete) — Splinter Review
* Clean-up of clipboard.js including removal of Mozilla 1.8 compatibility * Move resources/content/clipboard.js to base/content/calendar-clipboard.js * Adjust jar.mn files for moved file
Attachment #346268 - Flags: review?(philipp)
Comment on attachment 346268 [details] [diff] [review] Patch v1 >diff --git a/calendar/resources/content/clipboard.js b/calendar/base/content/calendar-clipboard.js >rename from calendar/resources/content/clipboard.js >rename to calendar/base/content/calendar-clipboard.js >--- a/calendar/resources/content/clipboard.js >+++ b/calendar/base/content/calendar-clipboard.js >@@ -13,264 +13,209 @@ > * > * The Original Code is Mozilla Calendar code. > * > * The Initial Developer of the Original Code is > * ArentJan Banck <ajbanck@planet.nl>. > * Portions created by the Initial Developer are Copyright (C) 2002 > * the Initial Developer. All Rights Reserved. > * >- * Contributor(s): ArentJan Banck <ajbanck@planet.nl> >- * Joey Minta <jminta@gmail.com> >- * Philipp Kewisch <mozilla@kewis.ch> >+ * Contributor(s): >+ * ArentJan Banck <ajbanck@planet.nl> Why are we naming ArentJan here, when he is already the initial developer? That seems to be not necessary, right?
Comment on attachment 346268 [details] [diff] [review] Patch v1 >+function canPaste() { >+ var flavors = ["text/calendar", "text/unicode"]; This can be const >+ return getClipboard().hasDataMatchingFlavors(flavors, flavors.length, >+ Components.interfaces.nsIClipboard.kGlobalClipboard); If you wrap parameters, wrap em all >+ var trans = Components.classes["@mozilla.org/widget/transferable;1"] >+ .createInstance(Components.interfaces.nsITransferable); Please use let instead of var in this patch where appropriate. > case "VEVENT": >+ var event = createEvent(); In light of migration to calUtils.jsm, please use cal.createEvent() instead. The same goes for createTodo() and any other calUtils.js functions you find. > var earliestDate = null; > for each(item in items) { Was item defined beforehand? If not, please use for each (let ...) (mind the missing space) r=philipp
Attachment #346268 - Flags: review?(philipp) → review+
Attachment #346437 - Flags: review?(philipp)
Comment on attachment 346437 [details] [diff] [review] Patch v2 (w/o actual file move) Looks good, r=philipp
Attachment #346437 - Flags: review?(philipp) → review+
Attachment #346268 - Attachment is obsolete: true
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/020882e3433b> -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
This checkin most probably regressed Bug 463784.
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: