Closed
Bug 665294
Opened 14 years ago
Closed 14 years ago
Switch suite to use Services.dirsvc
Categories
(SeaMonkey :: General, defect)
SeaMonkey
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:
* Creates helper for getting "Desktop" folder from Services.dirsvc
* Creates helper for getting nsIFile folders from Services.dirsvc
* Switches, where possible, to using either one of the new helpers or Services.dirsvc directly.
Attachment #540241 -
Flags: review?(neil)
Comment 1•14 years ago
|
||
Comment on attachment 540241 [details] [diff] [review]
helpers and switch to Services.dirsvc
>+function GetnsIFileFolder(aName)
I really don't like this function name. We could rename it GetSpecialDirectory, after the C++ convenience method NS_GetSpecialDirectory. Alternatively, most of the callers want the Profile folder, so you could implement GetProfileFolder for them, and use Services.dirsvc directly for the remaining ones.
Changes since last version:
* Moved try/catch to goDictionaryDownload helper
* Removed now unneeded addDictionary function and just call goDictionaryDownload directly from context menu.
Attachment #540241 -
Attachment is obsolete: true
Attachment #540241 -
Flags: review?(neil)
Attachment #540314 -
Flags: review?(neil)
Changes since last correct patch:
* Renamed original new helper to GetSpecialDirectory.
* Added new helper GetUrlbarHistoryFile and used it for the four locations that need that file.
Attachment #540314 -
Attachment is obsolete: true
Attachment #540314 -
Flags: review?(neil)
Attachment #540316 -
Flags: review?(neil)
Comment 4•14 years ago
|
||
Comment on attachment 540316 [details] [diff] [review]
extra helpers and switch to Services.dirsvc
>+ return GetSpecialDirectory("ProfD").append("urlbarhistory.sqlite");
...
>+ return GetSpecialDirectory("Home").append("journal.js");
This doesn't actually work; append alters the file object rather than returning (a new) one.
Attachment #540316 -
Flags: review?(neil) → review-
Changes since last version:
* Do append the old way.
Attachment #540316 -
Attachment is obsolete: true
Attachment #540358 -
Flags: review?(neil)
Comment 6•14 years ago
|
||
Comment on attachment 540358 [details] [diff] [review]
extra helpers and switch to Services.dirsvc with tweaked append [Checked in: Comment 7]
>+ var processDir = GetSpecialDirectory("ProfD");
You copied the variable name from editor, but it was getting a different special directory, which may well be the process dir (I can't remember them all offhand and I'm too tired to look it up). But technically this is the profile dir, not the process dir.
Attachment #540358 -
Flags: review?(neil) → review+
Comment on attachment 540358 [details] [diff] [review]
extra helpers and switch to Services.dirsvc with tweaked append [Checked in: Comment 7]
Checked in with variable name changed to profileDir
http://hg.mozilla.org/comm-central/rev/e5d292f48f15
Attachment #540358 -
Attachment description: extra helpers and switch to Services.dirsvc with tweaked append → extra helpers and switch to Services.dirsvc with tweaked append [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
•