Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
6c0c4b22
Commit
6c0c4b22
authored
5 years ago
by
André
Browse files
Options
Downloads
Patches
Plain Diff
Fix opening URIs from sandbox
parent
3898f165
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/common/helpers.py
+12
-7
12 additions, 7 deletions
gajim/common/helpers.py
with
12 additions
and
7 deletions
gajim/common/helpers.py
+
12
−
7
View file @
6c0c4b22
...
...
@@ -62,6 +62,7 @@
from
nbxmpp.const
import
Role
from
nbxmpp.protocol
import
JID
from
nbxmpp.protocol
import
InvalidJid
from
gi.repository
import
Gio
from
gi.repository
import
GLib
import
precis_i18n.codec
# pylint: disable=unused-import
...
...
@@ -625,11 +626,9 @@ def launch_file_manager(path_to_open):
except
Exception
:
pass
else
:
command
=
build_command
(
'
xdg-open
'
,
path_to_open
)
try
:
exec_command
(
command
)
except
Exception
:
pass
if
not
path_to_open
.
startswith
(
'
file://
'
):
path_to_open
=
'
file://
'
+
path_to_open
Gio
.
AppInfo
.
launch_default_for_uri
(
path_to_open
)
def
play_sound
(
event
):
if
not
app
.
config
.
get
(
'
sounds_on
'
):
...
...
@@ -1541,10 +1540,16 @@ def open_uri(uri, account=None):
elif
uri
.
type
==
URIType
.
MAIL
:
uri
=
'
mailto:%s
'
%
uri
.
data
webbrowser
.
open
(
uri
)
if
os
.
name
==
'
nt
'
:
webbrowser
.
open
(
uri
)
else
:
Gio
.
AppInfo
.
launch_default_for_uri
(
uri
)
elif
uri
.
type
in
(
URIType
.
WEB
,
URIType
.
GEO
):
webbrowser
.
open
(
uri
.
data
)
if
os
.
name
==
'
nt
'
:
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment