Add support for VoIP URIs. Patch from Jordan Callicoat. Closes LP #235906

This commit is contained in:
Chris Jones 2009-03-25 13:04:49 +00:00
parent 711986766a
commit 4fc90e8ba5
2 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,8 @@ terminator 0.13:
* Added command line option to specify working directory
* Improve transparency support in composited desktops.
* The tab bar can now be hidden and/or scrolled.
* Add configurability of cursor colour and shape
* Support various VoIP URIs
terminator 0.12:
* Bug fixes

View File

@ -498,6 +498,7 @@ text/plain
else:
err ('add_matches: Failed adding URL match patterns')
else:
self.matches['voip'] = self._vte.match_add(lboundry + '(callto:|h323:|sip:)' + "[" + userchars + "+][" + userchars + ".]*(:[0-9]+)?@?[" + pathchars + "]+" + rboundry)
self.matches['addr_only'] = self._vte.match_add (lboundry + "(www|ftp)[" + hostchars + "]*\.[" + hostchars + ".]+(:[0-9]+)?(" + urlpath + ")?" + rboundry + "/?")
self.matches['email'] = self._vte.match_add (lboundry + "(mailto:)?[a-zA-Z0-9][a-zA-Z0-9.+-]*@[a-zA-Z0-9][a-zA-Z0-9-]*\.[a-zA-Z0-9][a-zA-Z0-9-]+[.a-zA-Z0-9-]*" + rboundry)
self.matches['nntp'] = self._vte.match_add (lboundry + '''news:[-A-Z\^_a-z{|}~!"#$%&'()*+,./0-9;:=?`]+@[-A-Za-z0-9.]+(:[0-9]+)?''' + rboundry)
@ -1093,6 +1094,10 @@ text/plain
nameopen = _("_Send Mail To...")
namecopy = _("_Copy Email Address")
item = gtk.MenuItem (nameopen)
elif url[1] == self.matches['voip']:
nameopen = _("Ca_ll To...")
namecopy = _("_Copy Call Address")
item = gtk.MenuItem (nameopen)
else:
nameopen = _("_Open Link")
namecopy = _("_Copy Link Address")