After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741255 - Search engine preferences not migrated when URLs change
Search engine preferences not migrated when URLs change
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-08 14:28 UTC by Bastien Nocera
Modified: 2014-12-08 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
prefs-dialog: Make sure locale changes do not lose search engine (3.91 KB, patch)
2014-12-08 17:48 UTC, Claudio Saavedra
committed Details | Review

Description Bastien Nocera 2014-12-08 14:28:37 UTC
1. Start epiphany with the default settings
2. Change search engine to Google
3. Upgrade to a version of Epiphany with a different search URL for Google (such as 4b80445233471e4fd9f92b59fcf0e213e4d631bf, or log in under a different locale with its own Google version)
4. Realise that the search URL isn't updated

And it showed "http://google.com/search?q=%s" as the search engine.

Instead the search engine preferences should be an enum, which would follow the stock versions, and the translations (so logging in to a fr_FR desktop would actually switch the Google version to google.fr for example), and offer a fourth engine in the schemas "custom" which would be whatever the user configured.

This would avoid naked URLs showing up in the "Seach engine" drop-down, and avoid breakage like search not working anymore when Google started redirecting HTTP traffic to HTTPS.
Comment 1 Claudio Saavedra 2014-12-08 17:48:36 UTC
Created attachment 292309 [details] [review]
prefs-dialog: Make sure locale changes do not lose search engine

Add a stock unstranslatable url to be stored in gsettings so that
locale changes do not confuse the settings dialog.
Comment 2 Carlos Garcia Campos 2014-12-08 17:57:50 UTC
Review of attachment 292309 [details] [review]:

::: src/prefs-dialog.c
@@ +1111,2 @@
 		gtk_tree_model_get (GTK_TREE_MODEL (store), &iter,
+				    SEARCH_ENGINE_COL_STOCK_URL, &stock_url,

You are leaking this.
Comment 3 Claudio Saavedra 2014-12-08 18:56:04 UTC
Fixed that and pushed.