Permalink
Browse files

Switch the mount tray over to using "xdg-open" to open up the media d…

…irectory, now that xdg-open has been fixed for KDE.
  • Loading branch information...
Ken Moore
Ken Moore committed Aug 26, 2013
1 parent 22f21be commit 1b2924283182e7ca5295a7f00b3424708b7fff11
Showing with 6 additions and 6 deletions.
  1. +4 −4 src-qt4/pc-mounttray/mountTray.cpp
  2. +2 −2 src-qt4/pc-mounttray/mountTray.h
@@ -20,7 +20,7 @@ void MountTray::programInit()
qDebug() << "pc-mounttray: starting up";
MTINIT=true; //set the flag that the mount tray is initializing;
getInitialUsername(); //try to detect the non-root user who is running the program with root permissions
- getDefaultFileManager(); //try to detect the default file-manager for opening the mount directory
+ //getDefaultFileManager(); //try to detect the default file-manager for opening the mount directory
loadSavedSettings();
trayIcon = new QSystemTrayIcon(this);
@@ -286,7 +286,7 @@ void MountTray::getInitialUsername(){
USERNAME=username.simplified(); //set the global variable
if(DEBUG_MODE){ qDebug() << "-User detected:" << USERNAME; }
}
-
+/*
void MountTray::getDefaultFileManager(){
//Get the command to open the appropriate file manager
QString fmcmd = pcbsd::Utils::runShellCommand("de-info -fileman").join(" ");
@@ -298,7 +298,7 @@ void MountTray::getDefaultFileManager(){
FILEMAN = fmcmd.simplified();
if(DEBUG_MODE){ qDebug() << "-File manager detected:" << FILEMAN; }
}
-
+*/
void MountTray::slotOpenMediaDir(){
openMediaDir(MOUNTDIR);
}
@@ -315,7 +315,7 @@ void MountTray::openMediaDir(QString dir){
}
//Open the default file manager to the given directory as that user
qDebug() << "Opening the media directory with user permissions";
- QString cmd = "su -m "+USERNAME+" -c \'"+FILEMAN+" \""+dir+"\"\' &";
+ QString cmd = "su -m "+USERNAME+" -c \'xdg-open \""+dir+"\"\' &";
if(DEBUG_MODE){ qDebug() << " -cmd:" << cmd; }
system( cmd.toUtf8() );
}
@@ -58,7 +58,7 @@ private slots:
private:
DevCheck *DCheck;
- QString USERNAME, FILEMAN;
+ QString USERNAME;//, FILEMAN;
QLocalSocket* devdProc;
QTimer *devdTimer;
int numMount, numAvail;
@@ -80,7 +80,7 @@ private slots:
bool addDevice(QString,QString,QString,QString);
void startupDevdProc();
void getInitialUsername();
- void getDefaultFileManager();
+ //void getDefaultFileManager();
void loadSavedSettings();
void saveCurrentSettings();

0 comments on commit 1b29242

Please sign in to comment.