Philipp Hörist pushed to branch master at gajim / gajim
Commits:
2 changed files:
Changes:
| ... | ... | @@ -591,7 +591,7 @@ class ChatControl(ChatControlBase): |
| 591 | 591 |
if 'location' in self.contact.pep:
|
| 592 | 592 |
location = self.contact.pep['location']._pep_specific_data
|
| 593 | 593 |
if ('lat' in location) and ('lon' in location):
|
| 594 |
- uri = 'http://www.openstreetmap.org/?' + \
|
|
| 594 |
+ uri = 'https://www.openstreetmap.org/?' + \
|
|
| 595 | 595 |
'mlat=%(lat)s&mlon=%(lon)s&zoom=16' % {'lat': location['lat'],
|
| 596 | 596 |
'lon': location['lon']}
|
| 597 | 597 |
helpers.launch_browser_mailer('url', uri)
|
| ... | ... | @@ -803,6 +803,17 @@ class ConversationTextview(GObject.GObject): |
| 803 | 803 |
self.on_start_chat_activate(None, jid)
|
| 804 | 804 |
else:
|
| 805 | 805 |
self.on_start_chat_activate(None, word)
|
| 806 |
+ # handle geo:-URIs
|
|
| 807 |
+ elif word[:4] == 'geo:':
|
|
| 808 |
+ location = word[4:]
|
|
| 809 |
+ lat, _, lon = location.partition(',')
|
|
| 810 |
+ if lon == '':
|
|
| 811 |
+ return
|
|
| 812 |
+ uri = 'https://www.openstreetmap.org/?' \
|
|
| 813 |
+ 'mlat=%(lat)s&mlon=%(lon)s&zoom=16' % \
|
|
| 814 |
+ {'lat': lat, 'lon': lon}
|
|
| 815 |
+ helpers.launch_browser_mailer(kind, uri)
|
|
| 816 |
+ # other URIs
|
|
| 806 | 817 |
else:
|
| 807 | 818 |
helpers.launch_browser_mailer(kind, word)
|
| 808 | 819 |
|