diff --git a/gajim/conversation_textview.py b/gajim/conversation_textview.py index e3e8f4976a026cc811791fb9a03be327cf7a61ae..e1965563bcf1648c43af2984e02e359dbef0525a 100644 --- a/gajim/conversation_textview.py +++ b/gajim/conversation_textview.py @@ -803,6 +803,17 @@ class ConversationTextview(GObject.GObject): self.on_start_chat_activate(None, jid) else: 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: helpers.launch_browser_mailer(kind, word)