Closed Bug 347364 Opened 18 years ago Closed 18 years ago

Allow extensions to add searchplugins at an arbitrary position in the list

Categories

(Firefox :: Search, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 2 beta2

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

Currently extensions can add a searchplugin at the top of the list by setting the browser.search.order.1 pref. This is a little unfortunate because it doesn't "push down" the defaults by one. We can fix this by using a prefbranch:

pref("browser.search.order.extra.seznam", "Seznam");

This will push Seznam to the top of the list.
Attachment #232145 - Flags: review?(gavin.sharp)
Comment on attachment 232145 [details] [diff] [review]
Read .extra.* prefs, rev. 1

>Index: browser/components/search/nsSearchService.js

>+      try {
>+        var prefB = Cc["@mozilla.org/preferences-service;1"].
>+          getService(Ci.nsIPrefBranch);

nit: line up the "getService" with the "Cc" to match this file's style.
Attachment #232145 - Flags: review?(gavin.sharp) → review+
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attachment #232145 - Flags: approval1.8.1?
Comment on attachment 232145 [details] [diff] [review]
Read .extra.* prefs, rev. 1

a=drivers, although we wonder what happens when you get two extensions that try to do this. alphabetical? most-recently-added extension wins?
Attachment #232145 - Flags: approval1.8.1? → approval1.8.1+
the two get added at the top of the list, but it's random which one wins
Fixed on MOZILLA_1_8_BRANCH
Keywords: fixed1.8.1
Depends on: 1126722
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: