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>2011-11-17 01:48:44 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2011-11-17 01:48:44 (GMT)
commit56da020d44397ba9e6b82529bdf1273c8d556397 (patch)
tree20cce582d1b6a6c37f2276bb046d2e5844fbbc4e /webtoolbar.py
parenta11e0a0f5a9f127a2831cdb060d4267073eecf84 (diff)
Allow url without 'http://'HEADmaster
Use urlparse to set default scheme http. 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 db45cb1..70f59d5 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -33,6 +33,7 @@ from sugar3.activity.widgets import StopButton
#import filepicker
import places
+from browser import parse_url
_MAX_HISTORY_ENTRIES = 15
@@ -380,7 +381,8 @@ class PrimaryToolbar(ToolbarBase):
def _entry_activate_cb(self, entry):
browser = self._tabbed_view.props.current_browser
- browser.load_uri(entry.props.text)
+ url = parse_url(entry.props.text)
+ browser.load_uri(url)
browser.grab_focus()
def _go_home_cb(self, button):