Closed Bug 346762 Opened 14 years ago Closed 13 years ago

Lightning shouldn't include applicationUtils.js

Categories

(Calendar :: Lightning Only, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mattwillis, Assigned: sipaq)

References

Details

Attachments

(1 file, 1 obsolete file)

applicationUtils.js should hold Sunbird-only functions. 
Lightning shouldn't include it in its jar.mn, nor should it depend on any functions therein.

Spinoff of bug 325468.
This patch moves a bunch of utility functions that should have always lived in calendarUtils.js there.  This allows us to remove the dependency on applicationUtil.js in Lightning and lets that file become a true sunbird-only file, since it really is the only true application.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #231525 - Flags: second-review?(dmose)
Attachment #231525 - Flags: first-review?(mattwillis)
Comment on attachment 231525 [details] [diff] [review]
moves regular helpers to calendarUtils.js

Index: calendar/base/content/calendar-views.js

It looks like fixes from the category colour bug made it into this patch by accident.


Index: calendar/resources/content/calendarUtils.js
===================================================================
RCS file: /cvsroot/mozilla/calendar/resources/content/calendarUtils.js,v
retrieving revision 1.12.2.8
diff -p -U8 -r1.12.2.8 calendarUtils.js
--- calendar/resources/content/calendarUtils.js	31 Jul 2006 18:15:34 -0000	1.12.2.8
+++ calendar/resources/content/calendarUtils.js	+    var getFunc;

Same here and in the next 20 lines.

Index: calendar/resources/content/calendarUtils.js

When you paste in the lines from applicationUtil.js, can you whack them into style? There some lines with spaces inside the parens (except where it makes sense for clarity), and some if lines without braces.


Minusing on the bad diff stuff
Attachment #231525 - Flags: first-review?(mattwillis) → first-review-
Attachment #231525 - Flags: second-review?(dmose)
Attached patch Patch v2Splinter Review
New patch updated to tip incorporating lilmatt's review comments.
Assignee: jminta → bugzilla
Attachment #231525 - Attachment is obsolete: true
Attachment #267131 - Flags: review?(michael.buettner)
Comment on attachment 267131 [details] [diff] [review]
Patch v2

>+    	  var getFunc;
>         switch (prefB.getPrefType(aPrefName)) {
>             case nsIPrefBranch.PREF_BOOL:
>                 return prefB.getBoolPref(aPrefName);
>+                break;
>             case nsIPrefBranch.PREF_INT:
>                 return prefB.getIntPref(aPrefName);
>+                break;
>             case nsIPrefBranch.PREF_STRING:
>                 return prefB.getCharPref(aPrefName);
>+                break;
I suspect these lines were added by accident and therefore should be removed. r=mickey with this issue being addressed.
Attachment #267131 - Flags: review?(michael.buettner) → review+
Whiteboard: [checkin needed after 0.5]
Fix checked in
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed after 0.5]
Target Milestone: --- → 0.7
Depends on: 386350
This caused bug 386350.
Bug 371917 added applicationUtils.js back to Lightning. 
Bug 389522 was filed to remove it again from Lightning.
You need to log in before you can comment on or make changes to this bug.