Handle geo:-URIs
This commit is contained in:
parent
e740d12727
commit
a3e651b288
|
@ -803,6 +803,17 @@ class ConversationTextview(GObject.GObject):
|
||||||
self.on_start_chat_activate(None, jid)
|
self.on_start_chat_activate(None, jid)
|
||||||
else:
|
else:
|
||||||
self.on_start_chat_activate(None, word)
|
self.on_start_chat_activate(None, word)
|
||||||
|
# handle geo:-URIs
|
||||||
|
elif word[:4] == 'geo:':
|
||||||
|
location = word[4:]
|
||||||
|
lat, _, lon = location.partition(',')
|
||||||
|
if lon == '':
|
||||||
|
return
|
||||||
|
uri = 'https://www.openstreetmap.org/?' \
|
||||||
|
'mlat=%(lat)s&mlon=%(lon)s&zoom=16' % \
|
||||||
|
{'lat': lat, 'lon': lon}
|
||||||
|
helpers.launch_browser_mailer(kind, uri)
|
||||||
|
# other URIs
|
||||||
else:
|
else:
|
||||||
helpers.launch_browser_mailer(kind, word)
|
helpers.launch_browser_mailer(kind, word)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue