Closed
Bug 239533
Opened 21 years ago
Closed 14 years ago
about:config shoulds support URL query for specific prefs
Categories
(Toolkit :: Preferences, enhancement)
Toolkit
Preferences
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: benc, Assigned: int3)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [inbound])
Attachments
(2 files, 5 obsolete files)
668 bytes,
patch
|
Details | Diff | Splinter Review | |
1.39 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
about:config is too cool, and I use it all the time now, but the bigger problem
is that we have too many prefs!
What would be great is if we could use the URL parsing features to extend the
about:config so that it would allow the following:
1- display of a single pref:
about:config?network.online
2- display a subtree of the namespace:
about:config?network.proxy.*
3- display an arbitrary list of prefs:
about:config?network.online&offline.startup_state
This seems like it would be easier to do now that we support filters.
Comment 1•21 years ago
|
||
about is a simple URI which has it's own URL parser, so we are free to do
whatever we want. I like this idea.
Comment 2•21 years ago
|
||
It would be extra-cool if you could change settings via URI. For example, I
would love to be able to create a bookmark or pair of bookmarks that allow me to
toggle a setting. It's OK, if it has to be complex, or javascript ala the google
search add-on. Just so I could toggle browser.tabs.loadInBackground without
having to dig into prefs. Other settings may interest other users.
Comment 3•21 years ago
|
||
I would prefer the syntax:
about:config?filter=network.proxy.*
That will scale nicely as new features are added to about:config, such as being
able to search on multiple fields as in bug 213832:
about:config?filter=network.proxy.*&type=string&value=localhost*
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
Comment 4•20 years ago
|
||
I'll be very happy and appreciated if "filter=net*.*ro?y*.*" format is accepted.
I prefer "DIR(Win)" or "ls(*nix)" like filtering.
Comment 5•19 years ago
|
||
Bug 213832, another enhancement of about:config filtering(regular expression), has been landed on 12/27 by Gavin Sharp.
I have been wishing for something like this for years. It is not trivial, but would add tremendous value. Particularly if there is a way to offer a preference change through a simple link, like Eudora did for it's own .ini settings. This being comlicated, a simple clickable filter would be very welcome in the meantime.
** Clickable about:config URIs to change settings:
* Security:
Obviously, a link changing a preference cannot be allowed to do it without a well-informed user confirmation. It needs a UI (popup?) presenting:
- the meaning of the preference (see below)
- the default value
- the current value if different
- the new value
So this can only work if we also have
* Documentation:
All settings need to be clearly documented. Currently, most (but not all?) are documented in various separate wiki pages, which cannot be automatically searched or exported. So this structured documentation effort would need to be done first. It would produce either a file which would be delivered with Mozilla apps for this purpose, or a searchable database which would be queried when a preference is changed this way, or both.
** In the meantime, a clickable URI with optional filter:
Something like what Steve suggests in comment #3 would seem fine. And this seems not too difficult to implement.
** Support for different Mozilla apps:
One additional feature would be the ability to specify the application to which the setting is to be applied. Preferences could apply to Firefox, Thunderbird, Sunbird, etc. What about an Intranet web page listing the recommended settings for Thunderbird? When clicked in Firefox, there should be a way for FF to know to send that to Thunderbird which would then handle the interface for the user approval. Of course, TB suggested settings could be sent through email (like what was done with Eudora), but what about Sunbird settings?
Maybe something like
about:config?app=thunderbird;filter=mail.SpellCheckBeforeSend
about:config?app=thunderbird;set=mail.SpellCheckBeforeSend;value=true
or
about:config?thunderbird:mail.SpellCheckBeforeSend=true
MI:
In this bug, I don't want settable preferences. In fact, I'm pretty sure that links that set preferences are a bad idea.
If you want to request that, please file a new bug, and link to this bug as a blocker of that bug.
Attachment #342843 -
Flags: review?
Attachment #342843 -
Flags: approval1.9.0.4?
Updated•16 years ago
|
Attachment #342843 -
Flags: approval1.9.0.4?
Comment 9•16 years ago
|
||
Comment on attachment 342843 [details] [diff] [review]
config.js mod to support about:config?filter=<string>
This needs review before we'll consider it for approval, but likely this isn't branch material and should just get fixed in 1.9.1.
Comment 10•16 years ago
|
||
change patch format
Attachment #342843 -
Attachment is obsolete: true
Attachment #344752 -
Flags: review?
Attachment #342843 -
Flags: review?
![]() |
||
Comment 11•16 years ago
|
||
Changing product/component to Toolkit::Preferences
+ var url = document.documentURI;
+ var str = /^about:config\?filter\=/;
+ if (str.test(url)) {
var filterstring = window.location.search.substr("?filter=".length, window.location.search.length);
(stolen from <http://mxr.mozilla.org/mozilla1.8.0/source/toolkit/mozapps/extensions/content/extensions.js#144>)
The following should be merged with the end of ShowPrefs() (see Bug 440154):
+ textbox.value = url.replace(str, "");
textbox.value = filterstring;
+ textbox.focus();
+ FilterPrefs();
Assignee: jag → asmpgmr
Severity: normal → enhancement
Component: UI Design → Preferences
Product: SeaMonkey → Toolkit
QA Contact: pawyskoczka → preferences
![]() |
||
Comment 12•16 years ago
|
||
> The following should be merged with the end of ShowPrefs()
Well the code in the whole patch should be moved to the end of ShowPrefs().
Also when you request for a review you have to fill in the requestee field otherwise the review request will never be noticed by anyone. Gavin Sharp or neil@parkway seem to be the most likely reviewers for this patches in this area.
Comment 13•16 years ago
|
||
updated to work with bug 440154
Attachment #344752 -
Attachment is obsolete: true
Attachment #345888 -
Flags: review?(gavin.sharp)
Attachment #344752 -
Flags: review?
Updated•16 years ago
|
Flags: wanted1.9.2?
Whiteboard: [needs review gavin]
Comment 14•15 years ago
|
||
Comment on attachment 345888 [details] [diff] [review]
config.js mod to support about:config?filter=<string>
Sorry for the delay... Shouldn't this just use location.search?
Attachment #345888 -
Flags: review?(gavin.sharp)
Updated•14 years ago
|
Flags: wanted1.9.2?
Assignee | ||
Comment 15•14 years ago
|
||
So location.search seems to always be empty for about: URLs (see bug 675555). I've adapted the original patch to 1) use decodeURIComponent 2) call FilterPrefs() in only one place.
I'm not sure whether we should fill the textbox with the URL parameter if it already contains a value; my current patch does that while the original did not.
Do we have a test directory for about:config? I wanted to write a test for this but I wasn't able to find a tests/ directory under toolkit/components/viewconfig.
Attachment #549749 -
Flags: feedback?(gavin.sharp)
Assignee | ||
Comment 16•14 years ago
|
||
Oops, the last patch had changes I hadn't intended to put in.
Attachment #549749 -
Attachment is obsolete: true
Attachment #549750 -
Flags: feedback?(gavin.sharp)
Attachment #549749 -
Flags: feedback?(gavin.sharp)
Comment 17•14 years ago
|
||
Comment on attachment 549750 [details] [diff] [review]
Patch v1
How about:
var uri = document.documentURIObject;
var matches = /[?&]filter=([^&]+)/i.exec(uri.path);
Attachment #549750 -
Flags: feedback?(gavin.sharp) → feedback+
Updated•14 years ago
|
Whiteboard: [needs review gavin]
Assignee | ||
Comment 18•14 years ago
|
||
Patch updated with suggestions.
Taking this since it's been a while since it was last touched.
Assignee: asmpgmr → jezreel
Attachment #549750 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #550167 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 19•14 years ago
|
||
Attachment #550167 -
Attachment is obsolete: true
Attachment #550168 -
Flags: review?(gavin.sharp)
Attachment #550167 -
Flags: review?(gavin.sharp)
Comment 20•14 years ago
|
||
Comment on attachment 550168 [details] [diff] [review]
Patch v3
I think this is actually not a particularly useful feature, since about:config isn't linkable, and if you're going to type the URL in manually you might as well type in the filter manually too, but we can just land this - let's just not spend any more time on this :)
Attachment #550168 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: [inbound]
Comment 21•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Comment 23•13 years ago
|
||
Is this actually supposed to work? It doesn't for me.
Comment 24•13 years ago
|
||
(In reply to Eric Shepherd [:sheppy] from comment #23)
> Is this actually supposed to work? It doesn't for me.
This works for me. going to "about:config?filter=sessionstore" pre-fills the textfield and filters correctly (in both nightly & aurora)
Comment 25•13 years ago
|
||
Ah, I didn't read enough, I wasn't including the "filter=" part. It does work.
Comment 26•13 years ago
|
||
Documentation updated:
https://developer.mozilla.org/en/Preferences/A_brief_guide_to_Mozilla_preferences#Modifying_preferences
Also mentioned on Firefox 8 for developers.
Updated•13 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•