Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webtoolbar.py
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-01-05 12:29:21 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-01-05 12:29:21 (GMT)
commitb814f74b27a12ede9c063208b20f9f30ddbb9438 (patch)
tree99767a8ebec87f37a576378caae52c05f6f56a98 /webtoolbar.py
parente23ae0747e4648c3f15a11b49c4aaf196dd3423a (diff)
Normalize and autosearch url input.
This borrows code from Epiphany. Our normalize_or_autosearch_url is like the method of the same name in ephy-web-view.c . And the function has_web_scheme is like ephy_embed_utils_address_has_web_scheme in ephy-embed-utils.c Acked-by: Simon Schampijer <simon@laptop.org> Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Diffstat (limited to 'webtoolbar.py')
-rw-r--r--webtoolbar.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index 47ece72..c0e1396 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -384,7 +384,9 @@ class PrimaryToolbar(ToolbarBase):
def _entry_activate_cb(self, entry):
browser = self._tabbed_view.props.current_browser
- browser.load_uri(entry.props.text)
+ url = entry.props.text
+ effective_url = self._tabbed_view.normalize_or_autosearch_url(url)
+ browser.load_uri(effective_url)
browser.grab_focus()
def _go_home_cb(self, button):