GNOME Bugzilla – Bug 787458
Can't create new search engine
Last modified: 2017-09-09 16:45:52 UTC
Trying to manage search engines in preferences, adding a new engine seems impossible. Adding a new search engine, then exiting preferences and re-entering, shows the new search engine is not created. Trying to alter the created entry's name at all results in an exclamation point/warning and red outline for the Name field. (On this point, the warnings provide zero indication of what is wrong with the entry.) I am able to create a new search engine if I leave the name alone and simply alter the Address field. Altering the Bang field results also in error/warning indicators (exclamation point, red outline), but clicking off the field removes the error indicators. In short, the whole thing is borked and unusable atm.
Yes, it's broken in 3.24 as well. I wonder when it broke.
+ Trace 237944
638a8051cd970f231126ebed7cb02bcd289cae50 is the first bad commit commit 638a8051cd970f231126ebed7cb02bcd289cae50 Author: Michael Catanzaro <mcatanzaro@igalia.com> Date: Wed Jul 12 18:40:19 2017 -0500 search-engine-manager: Always return a search engine address We need to return a default search engine address if the value in GSettings is somehow messed up. This fixes a crash if the default-search-engine and search-engines settings somehow become desynced. https://bugzilla.redhat.com/show_bug.cgi?id=1470287 :040000 040000 ebeeedc9585205c31334124d180b56622d0f71d6 10eb6a11fa0318b8f29a29ba95fe6fa2eccec750 M lib
The following fixes have been pushed: 51f0156 search-engine-manager: get_address() must return NULL cc80324 search-provider: Simplify getting search engine address
Created attachment 359443 [details] [review] search-engine-manager: get_address() must return NULL The search-engine-dialog relies on get_address() returning NULL to detect new search engines. It doesn't function properly otherwise. All code using this function just needs to be prepared to handle a NULL address. In contrast, get_address_for_default_engine() really does need to always return a result. At least, it's more convenient this way, so that calling code doesn't have to handle that manually. Rename the function to make this more clear and reduce confusion, as it would be odd to have two parallel functions function differently in this respect.
Created attachment 359444 [details] [review] search-provider: Simplify getting search engine address We have a convenience function to get the default search address.