Philipp Hörist pushed to branch master at gajim / gajim
Commits: db6f0aa6 by lovetox at 2021-03-01T16:28:38+01:00 Windows: Open uris with webbrowser lib Trying to work around #10455 - - - - - 1 changed file: - gajim/common/helpers.py Changes: ===================================== gajim/common/helpers.py ===================================== @@ -47,6 +47,7 @@ import weakref import inspect import string +import webbrowser from string import Template import urllib from urllib.parse import unquote @@ -1099,13 +1100,22 @@ def open_uri(uri, account=None): open_file(uri.data) elif uri.type == URIType.TEL: - Gio.AppInfo.launch_default_for_uri(f'tel:{uri.data}') + if sys.platform == 'win32': + webbrowser.open(f'tel:{uri.data}') + else: + Gio.AppInfo.launch_default_for_uri(f'tel:{uri.data}') elif uri.type == URIType.MAIL: - Gio.AppInfo.launch_default_for_uri(f'mailto:{uri.data}') + if sys.platform == 'win32': + webbrowser.open(f'mailto:{uri.data}') + else: + Gio.AppInfo.launch_default_for_uri(f'mailto:{uri.data}') elif uri.type in (URIType.WEB, URIType.GEO): - Gio.AppInfo.launch_default_for_uri(uri.data) + if sys.platform == 'win32': + webbrowser.open(uri.data) + else: + Gio.AppInfo.launch_default_for_uri(uri.data) elif uri.type == URIType.AT: app.interface.new_chat_from_jid(account, uri.data) View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/db6f0aa6b503b5c4394366c24a53cea7d124e4cb -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/db6f0aa6b503b5c4394366c24a53cea7d124e4cb You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits