Use xdg-open for browsing folders

This commit is contained in:
Tony George 2013-11-03 18:03:27 +05:30
parent a25a0a48d7
commit cdec36947a
2 changed files with 13 additions and 5 deletions

View File

@ -1777,12 +1777,19 @@ namespace TeeJee.System{
public bool exo_open_folder (string dir_path){
/* Tries to open the given directory in a file manager */
/*
xdg-open is a desktop-independent tool for configuring the default applications of a user.
Inside a desktop environment (e.g. GNOME, KDE, Xfce), xdg-open simply passes the arguments
to that desktop environment's file-opener application (gvfs-open, kde-open, exo-open, respectively).
We will first try using xdg-open and then check for specific file managers if it fails.
*/
string path;
path = get_cmd_path ("exo-open");
path = get_cmd_path ("xdg-open");
if ((path != null)&&(path != "")){
return execute_command_script_async ("exo-open \"" + dir_path + "\"");
return execute_command_script_async ("xdg-open \"" + dir_path + "\"");
}
path = get_cmd_path ("nemo");

View File

@ -17,17 +17,18 @@ long_line_behaviour=1
long_line_column=80
[files]
current_page=1
FILE_NAME_0=57875;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMain.vala;0;4
current_page=10
FILE_NAME_0=9631;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMain.vala;0;4
FILE_NAME_1=36154;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMainWindow.vala;0;4
FILE_NAME_2=28267;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FSettingsWindow.vala;0;4
FILE_NAME_3=25774;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FRestoreWindow.vala;0;4
FILE_NAME_4=1621;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FUtility.vala;0;4
FILE_NAME_4=42464;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FUtility.vala;0;4
FILE_NAME_5=708;Make;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2Fmakefile;0;4
FILE_NAME_6=813;Conf;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fdebian%2Fcontrol;0;4
FILE_NAME_7=372;None;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fdebian%2Fchangelog;0;4
FILE_NAME_8=3838;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FExcludeMessageWindow.vala;0;4
FILE_NAME_9=433;Sh;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fbuild-release.sh;0;4
FILE_NAME_10=524;Sh;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Finstaller%2Finstall.sh;0;4
[VTE]
last_dir=/home/teejee