Add apturl support. Closes LP #499902

This commit is contained in:
Chris Jones 2009-12-24 11:59:41 +00:00
parent fd91711451
commit 4513eeafc7
1 changed files with 5 additions and 0 deletions

View File

@ -385,6 +385,9 @@ class TerminatorTerm (gtk.VBox):
for item in re.findall(r'[0-9]+',url):
url = 'https://bugs.launchpad.net/bugs/%s' % item
return url
elif match == self.matches['apturl']:
# xdg-open will work as-is with apt: URLs
pass
return url
@ -633,6 +636,8 @@ text/plain
# the regular expression is similar to the perl one specified in the Ubuntu Policy Manual - /lp:\s+\#\d+(?:,\s*\#\d+)*/i
self.matches['launchpad'] = self._vte.match_add ('\\b(lp|LP):?\s?#?[0-9]+(,\s*#?[0-9]+)*\\b')
self.matches['apturl'] = self._vte.match_add ('\\bapt.*\\b')
def _path_lookup(self, command):
if os.path.isabs (command):
if os.path.isfile (command):