introducing: launch_file_manager()
This commit is contained in:
parent
99bf5ba99f
commit
d082539517
|
@ -181,7 +181,7 @@ def is_in_path(name_of_command, return_abs_path = False):
|
||||||
else:
|
else:
|
||||||
return is_in_dir
|
return is_in_dir
|
||||||
|
|
||||||
def launch_browser_mailer(self, kind, uri):
|
def launch_browser_mailer(kind, uri):
|
||||||
#kind = 'url' or 'mail'
|
#kind = 'url' or 'mail'
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
try:
|
try:
|
||||||
|
@ -209,12 +209,28 @@ def launch_browser_mailer(self, kind, uri):
|
||||||
return
|
return
|
||||||
# we add the uri in "" so we have good parsing from shell
|
# we add the uri in "" so we have good parsing from shell
|
||||||
command = command + ' "' + uri + '" &'
|
command = command + ' "' + uri + '" &'
|
||||||
try: #FIXME: when we require 2.4+ use subprocess module
|
try: #FIXME: when we require python2.4+ use subprocess module
|
||||||
os.system(command)
|
os.system(command)
|
||||||
except:
|
except:
|
||||||
pass
|
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'):
|
if not gajim.config.get('sounds_on'):
|
||||||
return
|
return
|
||||||
path_to_soundfile = gajim.config.get_per('soundevents', event, 'path')
|
path_to_soundfile = gajim.config.get_per('soundevents', event, 'path')
|
||||||
|
|
Loading…
Reference in New Issue