Closed
Bug 329582
Opened 19 years ago
Closed 16 years ago
remove gCalendarWindow
Categories
(Calendar :: Sunbird Only, defect)
Calendar
Sunbird Only
Tracking
(Not tracked)
VERIFIED
FIXED
1.0b1
People
(Reporter: jminta, Assigned: mschroeder)
References
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
mattwillis
:
first-review+
mvl
:
second-review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
dbo
:
review+
|
Details | Diff | Splinter Review |
The fact that so many separate areas depend on gCalendarWindow was one of the reasons why the new views patch had to be as large as it was. Instead, I think a much better code model is to have many smaller, independent areas of the code. This helps in making other fixes of bugs much smaller and easier to review.
After the landing of the new views, gCalendarWindow became dramatically smaller, and non-essential to proper Sunbird functioning. This bug is to finish removing the remaining areas of the code that depend on it and eventually stop packaging calendarWindow.js all together. Some of the smaller parts of gCalendarWindow can be removed by patches directly in this bug. However, this also depends on:
Bug 321384 - to remove gCalendarWindow.EventSelection
Bug 306079 - to remove gCalendarWindow.CalendarPreferences
Bug 322768 - to remove gCalendarWindow.dateFormater
Reporter | ||
Comment 1•19 years ago
|
||
When the new views landed, I changed gCalendarWindow.currentView from an actual pointer to a view into a shim to minimize patch size. This patch removes that extra object, updating the areas that relied on it to use the new appropriate calls. This also allows us to remove several uses of jsDateToDateTime, which is generally a plus.
For the most part, this patch changes no behavior. The one thing that it does change is that the arguments for newEvent and newToDo are now calDateTime objects, rather than jsDate objects. No one actually passed arguments in, so this change is rather moot, but I thought I'd point it out.
This patch also removes/consolidates a few onmouseup functions that were watching splitters.
Attachment #214282 -
Flags: first-review?(mvl)
Reporter | ||
Comment 2•18 years ago
|
||
Comment on attachment 214282 [details] [diff] [review]
remove gCalendarWindow.currentView
This patch is horribly rotted at this point :-(
Attachment #214282 -
Flags: first-review?(mvl)
Reporter | ||
Comment 3•18 years ago
|
||
This patch takes care of a bunch of the easily removed stuff, resulting especially from the introduction of nice new helper functions in calendar-views.js. We have:
-remove .currentView.goToNext/goToPrevious in favor of moveView(1);
-remove obsolete event handlers (for splitter movement)
-remove .getSelectedDate() in favor of currentView().selectedDay.jsDate (we should work to remove the jsDate stuff here later
-remove calendarMail.js, which depends on the nonexistent gCalendarWindow.EventSelection
-remove various other .currentView stuff that's no longer used.
Attachment #214282 -
Attachment is obsolete: true
Attachment #247622 -
Flags: second-review?(mvl)
Attachment #247622 -
Flags: first-review?(lilmatt)
Comment 4•18 years ago
|
||
Comment on attachment 247622 [details] [diff] [review]
[checked in] remove easy stuff
r=lilmatt
Are we not cvs rm-ing calendarMail.js on purpose in this patch?
Attachment #247622 -
Flags: first-review?(lilmatt) → first-review+
Comment 5•18 years ago
|
||
Comment on attachment 247622 [details] [diff] [review]
[checked in] remove easy stuff
>Index: calendar/resources/jar.mn
>- content/calendar/calendarMail.js (content/calendarMail.js)
http://lxr.mozilla.org/seamonkey/source/calendar/sunbird/base/content/calendar-sets.inc#56 still calls a function from that file.
> CalendarWindow.prototype.pickAndGoToDate = function calWin_pickAndGoToDate( )
> {
>- var currentView = document.getElementById("view-deck").selectedPanel;
> var args = new Object();
>- args.initialDate = this.getSelectedDate();
>+ args.initialDate = currentView().selectedDay.getInTimezone("floating").jsDate;
> args.onOk = function receiveAndGoToDate( pickedDate ) {
>- currentView.goToDay( jsDateToDateTime(pickedDate) );
>+ currentView().goToDay( jsDateToDateTime(pickedDate) );
Why are you converting from calIDAteTime to jsDate first, and then vonverting back? That looks silly.
r2=mvl with that fixed
Updated•18 years ago
|
Attachment #247622 -
Flags: second-review?(mvl) → second-review+
Updated•18 years ago
|
Assignee: nobody → jminta
Whiteboard: [needs checkin]
Target Milestone: --- → Sunbird 0.5
Reporter | ||
Comment 6•18 years ago
|
||
Patch checked in with the mail bits removed. I need to convert back and forth for the js-bits because we use a datepicker that needs a js-date.
Comment 7•18 years ago
|
||
(In reply to comment #5)
> >- content/calendar/calendarMail.js (content/calendarMail.js)
> http://lxr.mozilla.org/seamonkey/source/calendar/sunbird/base/content/calendar-sets.inc#56
> still calls a function from that file.
Perhaps the link is outdated, but that link points to PrintUtils.showPageSetup(); which is part of toolkit, not calendarMail.js.
Reporter | ||
Comment 8•18 years ago
|
||
(In reply to comment #7)
> Perhaps the link is outdated,
The link previously pointed to "send_event_command".
Comment 9•18 years ago
|
||
(In reply to comment #8)
I think "send_event_command" can be removed from Sunbird.
It hasn't worked in forever, and it's not going to for a bit.
Then we can get the rest of the dependencies cleaned up from this patch.
Reporter | ||
Comment 10•18 years ago
|
||
(In reply to comment #9)
> (In reply to comment #8)
> I think "send_event_command" can be removed from Sunbird.
I did get rid of it when I landed the patch last night. That's what I meant about 'mail bits removed'.
Reporter | ||
Updated•18 years ago
|
Whiteboard: [needs checkin]
Reporter | ||
Comment 12•17 years ago
|
||
Re-assigning my bugs to nobody@mozilla.org due to recent developments.
Assignee: jminta → nobody
Comment 13•16 years ago
|
||
Is this bug still valid? What actions are remaining? According to MXR there are still 6 references to gCalendarWindow: http://mxr.mozilla.org/seamonkey/search?string=gCalendarWindow
Assignee | ||
Comment 14•16 years ago
|
||
I'll try to finish this.
Assignee: nobody → mschroeder
Version: Trunk → unspecified
Assignee | ||
Updated•16 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 15•16 years ago
|
||
Attachment #344049 -
Flags: review?(daniel.boelzle)
Assignee | ||
Updated•16 years ago
|
Attachment #247622 -
Attachment description: remove easy stuff → [checked in] remove easy stuff
Comment 16•16 years ago
|
||
Comment on attachment 344049 [details] [diff] [review]
(Re-)Move remaining gCalendarWindow stuff v1
r=dbo
Attachment #344049 -
Flags: review?(daniel.boelzle) → review+
Assignee | ||
Comment 17•16 years ago
|
||
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/1b5f6939cb84>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Comment 18•16 years ago
|
||
Checked in lightning and sunbird build 20090128 -> VERIFIED.
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Target Milestone: 1.0 → 1.0b1
You need to log in
before you can comment on or make changes to this bug.
Description
•