Closed
Bug 664834
Opened 14 years ago
Closed 14 years ago
Switch suite/mailnews to use Services.io
Categories
(SeaMonkey :: MailNews: General, defect)
SeaMonkey
MailNews: General
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.4
People
(Reporter: iannbugzilla, Assigned: iannbugzilla)
References
Details
Attachments
(1 file, 3 obsolete files)
At the moment we have Services.jsm imported but we're not making full use of it.
This patch:
* Switches, where possible, to using Services.io
Attachment #539889 -
Flags: review?(neil)
Comment 1•14 years ago
|
||
Comment on attachment 539889 [details] [diff] [review]
suite mailnews switch to Services.io
> function CheckOnline()
> {
>- var ioService = Components.classes["@mozilla.org/network/io-service;1"]
>- .getService(Components.interfaces.nsIIOService);
>- return (!ioService.offline);
>+ return (!Services.io.offline);
Is it worth replacing CheckOnline completely? Also, don't need the ()s.
> // Lazily create these globals.
>- if (!gIOService) {
Just because you removed gIOService doesn't mean you should create gFileHandler and gProfileDirURL every time!
>- var profileDir = Components.classes["@mozilla.org/file/directory_service;1"]
>- .getService(Components.interfaces.nsIProperties)
[Are you planning to change this to Services.dirsvc at some point?]
Changes since last version:
* Removed CheckOnline function.
* Simplified some code in mailWindowOverlay.js around CheckOnline removal.
* Check if globals exist before creating.
Attachment #539889 -
Attachment is obsolete: true
Attachment #539889 -
Flags: review?(neil)
Attachment #540056 -
Flags: review?(neil)
Comment 3•14 years ago
|
||
Comment on attachment 540056 [details] [diff] [review]
suite mailnews switch to Services.io and no CheckOnline
>+ if (!Services.io.offline || DoGetNewMailWhenOffline())
This line appears several times. Maybe the offline check belongs inside DoGetNewMailWhenOffline() ;-)
Attachment #540056 -
Flags: review?(neil) → review+
Changes since last version:
* Added a check on !Services.io.offline to DoGetNewMailWhenOffline
* Removed, where applicable, !Services.io.offline check.
Attachment #540056 -
Attachment is obsolete: true
Attachment #540223 -
Flags: review?(neil)
Changes since last version:
* If statement changes in mailWindow.js didn't work on second looks, so keeping to a simple change.
Attachment #540223 -
Attachment is obsolete: true
Attachment #540223 -
Flags: review?(neil)
Attachment #540225 -
Flags: review?(neil)
Comment 6•14 years ago
|
||
Comment on attachment 540225 [details] [diff] [review]
suite mailnews switch to Services.io and revised DoGetNewMailWhenOffline v2 [Checked in: Comment 7]
>+ return (IsFolderSelected() && !Services.io.offline &&
>+ GetNumSelectedMessages() > 0);
Nit: could probably drop the outer set of ()s.
Attachment #540225 -
Flags: review?(neil) → review+
Comment on attachment 540225 [details] [diff] [review]
suite mailnews switch to Services.io and revised DoGetNewMailWhenOffline v2 [Checked in: Comment 7]
http://hg.mozilla.org/comm-central/rev/8f52a70cb585
Attachment #540225 -
Attachment description: suite mailnews switch to Services.io and revised DoGetNewMailWhenOffline v2 → suite mailnews switch to Services.io and revised DoGetNewMailWhenOffline v2 [Checked in: Comment 7]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.4
You need to log in
before you can comment on or make changes to this bug.
Description
•