Merge lp:~diogenesethecynical/lernid/bug793793_2 into lp:lernid

Proposed by Diogenese TheCynical
Status: Merged
Approved by: John S. Gruber
Approved revision: 230
Merged at revision: 229
Proposed branch: lp:~diogenesethecynical/lernid/bug793793_2
Merge into: lp:lernid
Diff against target: 20 lines (+3/-0)
1 file modified
lernid/widgets/Browser.py (+3/-0)
To merge this branch: bzr merge lp:~diogenesethecynical/lernid/bug793793_2
Reviewer Review Type Date Requested Status
John S. Gruber Approve
Review via email: mp+70884@code.launchpad.net

Description of the change

Updated with scheme.

To post a comment you must log in.
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Thanks for working on this.

Did you test this latest patch? I'm afraid I can't get it to work.

Also, the usual style for Python is to use spaces rather than tabs. It makes things simpler when various maintainers with varying settings for the meaning of tabs in their editors are working on the same code.

John

review: Needs Fixing
230. By Diogenese <email address hidden>

Bug 793793 with tab fixed

Revision history for this message
Diogenese TheCynical (diogenesethecynical) wrote :

Hi John

Probably something messed up when I was trying to merge in the older branch. I am sorry for this oversight.

Please review this again. I have fixed the tab thing.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Looks good. Thanks again.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lernid/widgets/Browser.py'
2--- lernid/widgets/Browser.py 2011-07-21 05:09:37 +0000
3+++ lernid/widgets/Browser.py 2011-08-10 12:13:32 +0000
4@@ -26,6 +26,7 @@
5 from lernid.widgets.Widget import Widget
6 from lernid.LernidOptions import Options
7 from lernid.lernidconfig import get_data_path
8+from urlparse import urlparse
9
10 class Browser(Widget):
11
12@@ -115,6 +116,8 @@
13 return self._browser.get_property('uri')
14
15 def set_location(self, url):
16+ if urlparse(url).scheme == '':
17+ url = 'http://' + url
18 logging.debug('opening url: '+url)
19 self._browser.open(url)
20 self.emit('page-changed', url)

Subscribers

People subscribed via source and target branches