Skip to content
Snippets Groups Projects
Commit a3e651b2 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist
Browse files

Handle geo:-URIs

parent e740d127
No related branches found
No related tags found
No related merge requests found
...@@ -803,6 +803,17 @@ class ConversationTextview(GObject.GObject): ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment