Philipp Hörist pushed to branch master at gajim / gajim
Commits: a3e651b2 by Daniel at 2018-03-06T11:21:09+01:00 Handle geo:-URIs
- - - - - a92bca40 by Daniel at 2018-03-06T11:21:09+01:00 Use https for OpenStreetMap URIs built from PEP
- - - - -
2 changed files:
- gajim/chat_control.py - gajim/conversation_textview.py
Changes:
===================================== gajim/chat_control.py ===================================== --- a/gajim/chat_control.py +++ b/gajim/chat_control.py @@ -591,7 +591,7 @@ class ChatControl(ChatControlBase): if 'location' in self.contact.pep: location = self.contact.pep['location']._pep_specific_data if ('lat' in location) and ('lon' in location): - uri = 'http://www.openstreetmap.org/?' + \ + uri = 'https://www.openstreetmap.org/?' + \ 'mlat=%(lat)s&mlon=%(lon)s&zoom=16' % {'lat': location['lat'], 'lon': location['lon']} helpers.launch_browser_mailer('url', uri)
===================================== gajim/conversation_textview.py ===================================== --- 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)
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/e740d12727032bc4bd382c1a128394cac9...
--- View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/e740d12727032bc4bd382c1a128394cac9... You're receiving this email because of your account on dev.gajim.org.