Closed
Bug 1107356
Opened 10 years ago
Closed 9 years ago
"browser-search-engine-modified" is not emitted if we toggle a checkbox in one-off search preference.
Categories
(Firefox :: Search, defect)
Firefox
Search
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: tetsuharu, Unassigned)
References
Details
[reproducible revision]
* https://hg.mozilla.org/mozilla-central/rev/2c9781c3e9b5
* Enable one-off search (bug 1088660)
[step to reproduce]
1. Open "Search" pane in "Preference" window/tab.
2. Toggle a checkbox which switch whether a search engine is shown up in one-off search.
[current result]
"browser-search-engine-modified" nsIObserver topic will not not emitted.
[expected]
"browser-search-engine-modified" should be emitted.
If our codes/add-ons subscribe it topic, they can handle the change of search engine preference. Before the landing bug 1088660, the old search bar emitted if we add/remove a search engine. I think we should emit the topic when user toggle a search engine in search pane for one-off search.
Reporter | ||
Updated•10 years ago
|
Blocks: fx34-searchui
Comment 1•10 years ago
|
||
Do you have a specific use case or add-on in mind where getting this notification would be useful and more practical than observing changes to the browser.search.hiddenOneOffs preference?
Flags: needinfo?(saneyuki.s.snyk)
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] (High latency until Jan 5) from comment #1)
> Do you have a specific use case or add-on in mind where getting this
> notification would be useful and more practical than observing changes to
> the browser.search.hiddenOneOffs preference?
Yes. This is the example of it: https://github.com/saneyuki/Fork-ContextSearch
This example uses "browser-search-engine-modified" to update its context menu. If its notification is emitted, the example reconstruct the search menu.
I think the following scenario which is useful:
1. Observe "browser-search-engine-modified" when change the sort order of search engine or switch their enabled/disabled.
2. Get the new search engine setting with calling all the `Services.search.getVisibleEngines` or other APIs related to search engines.
3. Update somethings with using the information which we got in step 2.
Flags: needinfo?(saneyuki.s.snyk)
Comment 3•10 years ago
|
||
(In reply to Tetsuharu OHZEKI [UTC+9] from comment #2)
> (In reply to Florian Quèze [:florian] [:flo] (High latency until Jan 5) from
> comment #1)
> > Do you have a specific use case or add-on in mind where getting this
> > notification would be useful and more practical than observing changes to
> > the browser.search.hiddenOneOffs preference?
>
> Yes. This is the example of it:
> https://github.com/saneyuki/Fork-ContextSearch
I just reviewed the code of this add-on, it doesn't do anything related to hidden one-off engines.
> 2. Get the new search engine setting with calling all the
> `Services.search.getVisibleEngines` or other APIs related to search engines.
getVisibleEngines returns the list of installed engines minus the default engines that the user "removed" (default engines are unremovable, so when the user clicks "remove" on them we only make them invisible). This API existed before we added the concept of hidden/visible one-off button.
Comment 4•9 years ago
|
||
Doesn't sound like this is actually needed. Please reopen if that isn't the case.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•