Closed Bug 298429 Opened 20 years ago Closed 20 years ago

Opening Cache preferences page adds cache pref

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mcsmurf, Assigned: mcsmurf)

Details

Attachments

(2 files, 2 obsolete files)

When you open the preferences window and select Advanced->Cache, the preference browser.cache.disk.parent_directory will get written. This pref is no longer needed normally (except you want to change the path to the cache, of course ;).
Attached patch Patch (obsolete) — Splinter Review
Assignee: prefs → bugzilla
Status: NEW → ASSIGNED
Attachment #187004 - Flags: review?(cbiesinger)
Oh, was the try...catch because of the var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"].getService(nsIProperties);? If yes i can add it back, but if that fails we're screwed anyway IMHO :).
Oh, was the try...catch because of the var dirSvc = Components.classes["@mozilla.org/file/directory_service;1"].getService(nsIProperties);? If yes i can add it back, but if that fails we're screwed anyway IMHO :).
Comment on attachment 187004 [details] [diff] [review] Patch I thought it was also for the .get... please add it back though
Attachment #187004 - Flags: review?(cbiesinger) → review-
Attached patch Patch 2 (obsolete) — Splinter Review
Attachment #187004 - Attachment is obsolete: true
Attachment #187121 - Flags: review?(cbiesinger)
Comment on attachment 187121 [details] [diff] [review] Patch 2 r=me, although I would prefer if the code stored the file from the filepicker/pref instead of recreating it.
Attachment #187121 - Flags: review?(cbiesinger) → review+
Attachment #187121 - Flags: superreview?(neil.parkwaycc.co.uk)
Comment on attachment 187121 [details] [diff] [review] Patch 2 Recreating the file won't work on the Mac.
Attachment #187121 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview-
oops. yeah. I suck, I forgot that this dialog was one of them...
Attached patch Patch 3Splinter Review
Attachment #187121 - Attachment is obsolete: true
Attachment #187292 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #187292 - Flags: review?(cbiesinger)
Comment on attachment 187292 [details] [diff] [review] Patch 3 > var gFolderField; >+var dir; This should be called something more meaningful e.g. gCacheParentDir; sr=me with this fixed. > var localFile = fp.file.QueryInterface(nsILocalFile); I wonder whether you ought to save this as the default in case the browse button is clicked again (particularly once someone manages to fix this not to be instant-apply).
Attachment #187292 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Comment on attachment 187292 [details] [diff] [review] Patch 3 I wonder if we should put code somewhere to clear the pref if it is equal to the default. (but this pref panel would be the wrong place for it) I think that you should assign the new directory to your global variable, so that clicking browse again does the right thing. wanna file a bug on stopping doing the instant-apply thing? Setting displayDirectory to null crashes, so don't do that (bug 252058)
Attachment #187292 - Flags: review?(cbiesinger) → review-
Comment on attachment 187292 [details] [diff] [review] Patch 3 ok, looks like passing null does not actually crash anymore
Attachment #187292 - Flags: review- → review+
libpref already forgets any prefs that match defaults
this is not one of those obviously, because the default only lives in code, not in all.js, and can't live there.
Version: unspecified → Trunk
Comment on attachment 187292 [details] [diff] [review] Patch 3 seamonkey only
Attachment #187292 - Flags: approval1.8b4?
Attachment #187292 - Flags: approval1.8b4? → approval1.8b4+
Checking in xpfe/components/prefwindow/resources/content/pref-cache.js; /cvsroot/mozilla/xpfe/components/prefwindow/resources/content/pref-cache.js,v <-- pref-cache.js new revision: 1.18; previous revision: 1.17 done Can someone file a bug about automatically removing that pref if it exists?
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
(and is equal to the former default location)
Checking in pref-cache.js; /cvsroot/mozilla/xpfe/components/prefwindow/resources/content/pref-cache.js,v <-- pref-cache.js new revision: 1.19; previous revision: 1.18
I filed Bug 301668 about the issue that the pref applies immediately not after clicking OK. Will file another bug for the issue mentioned in Comment 17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: