Assume http:// for URLs without it

This commit is contained in:
Iain Lane 2008-09-06 16:01:12 +01:00
parent 6b680e4c52
commit 4bb1a11595
1 changed files with 4 additions and 1 deletions

View File

@ -832,7 +832,10 @@ text/plain
if url: if url:
if url[1] != self.matches['email']: if url[1] != self.matches['email']:
address = url[0] if url[1]: # Assume HTTP if we launch a URL with no protocol, otherwise xdg-open won't open it
address = "http://" + url[0]
else:
address = url[0]
nameopen = _("_Open Link") nameopen = _("_Open Link")
namecopy = _("_Copy Link Address") namecopy = _("_Copy Link Address")
iconopen = gtk.image_new_from_stock(gtk.STOCK_JUMP_TO, gtk.ICON_SIZE_MENU) iconopen = gtk.image_new_from_stock(gtk.STOCK_JUMP_TO, gtk.ICON_SIZE_MENU)