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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Weblate
gajim
Commits
d0825395
Commit
d0825395
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
introducing: launch_file_manager()
parent
99bf5ba9
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
src/common/helpers.py
+19
-3
19 additions, 3 deletions
src/common/helpers.py
with
19 additions
and
3 deletions
src/common/helpers.py
+
19
−
3
View file @
d0825395
...
...
@@ -181,7 +181,7 @@ def is_in_path(name_of_command, return_abs_path = False):
else
:
return
is_in_dir
def
launch_browser_mailer
(
self
,
kind
,
uri
):
def
launch_browser_mailer
(
kind
,
uri
):
#kind = 'url' or 'mail'
if
os
.
name
==
'
nt
'
:
try
:
...
...
@@ -209,12 +209,28 @@ def launch_browser_mailer(self, kind, uri):
return
# we add the uri in "" so we have good parsing from shell
command
=
command
+
'
"'
+
uri
+
'"
&
'
try
:
#FIXME: when we require 2.4+ use subprocess module
try
:
#FIXME: when we require
python
2.4+ use subprocess module
os
.
system
(
command
)
except
:
pass
def
play_sound
(
self
,
event
):
def
launch_file_manager
(
path_to_open
):
if
gajim
.
config
.
get
(
'
openwith
'
)
==
'
gnome-open
'
:
command
=
'
gnome-open
'
elif
gajim
.
config
.
get
(
'
openwith
'
)
==
'
kfmclient exec
'
:
command
=
'
kfmclient exec
'
elif
gajim
.
config
.
get
(
'
openwith
'
)
==
'
custom
'
:
command
=
gajim
.
config
.
get
(
'
custom_file_manager
'
)
if
command
==
''
:
# if no app is configured
return
# we add the path in "" so we have good parsing from shell
command
=
command
+
'
"'
+
uri
+
'"
&
'
try
:
#FIXME: when we require python2.4+ use subprocess module
os
.
system
(
command
)
except
:
pass
def
play_sound
(
event
):
if
not
gajim
.
config
.
get
(
'
sounds_on
'
):
return
path_to_soundfile
=
gajim
.
config
.
get_per
(
'
soundevents
'
,
event
,
'
path
'
)
...
...
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