diff options
author | Christian Dywan <christian@twotoasts.de> | 2019-10-12 12:16:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-12 12:16:26 +0200 |
commit | d8546ca689af185a456ec1f394bb89926d7c142a (patch) | |
tree | 214aef78806d91322b7e74b7e6c5544c67fd1aa4 | |
parent | 435ef6d48c4b4ff07c00ea028edd89a3ea2d5386 (diff) | |
download | midori-git-d8546ca689af185a456ec1f394bb89926d7c142a.tar.gz |
In the case where a search engine was manually added to the config file
or provided through distro defaults, the combo will display the
hostname.
Fixes: #211
-rw-r--r-- | core/preferences.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/preferences.vala b/core/preferences.vala index faa65c98..0d7f0f1b 100644 --- a/core/preferences.vala +++ b/core/preferences.vala @@ -115,6 +115,12 @@ namespace Midori { combo.append ("http://search.yahoo.com/search?p=", "Yahoo"); combo.append ("http://www.google.com/search?q=%s", "Google"); settings.bind_property ("location-entry-search", combo, "active-id", BindingFlags.SYNC_CREATE | BindingFlags.BIDIRECTIONAL); + // Generic item for custom search option + if (combo.get_active_text () == null) { + string hostname = new Soup.URI (settings.location_entry_search).host; + combo.append (settings.location_entry_search, hostname); + combo.active_id = settings.location_entry_search; + } box.add (combo); box.show_all (); add (_("Browsing"), box); |