Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 2 additions and 16 deletions.
  1. +1 −14 src-qt4/pc-mounttray/mountTray.cpp
  2. +1 −2 src-qt4/pc-mounttray/mountTray.h
View
15 src-qt4/pc-mounttray/mountTray.cpp
@@ -20,7 +20,6 @@ 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
loadSavedSettings();
trayIcon = new QSystemTrayIcon(this);
@@ -287,18 +286,6 @@ void MountTray::getInitialUsername(){
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(" ");
- //qDebug() << "de-info result:" << fmcmd;
- fmcmd = fmcmd.remove("%s").simplified();
- //qDebug() << "FM command found:" << fmcmd;
- if( fmcmd.isEmpty() || fmcmd.contains("File ") ){fmcmd= "openwith"; } //Default to the "openwith" command
-
- FILEMAN = fmcmd.simplified();
- if(DEBUG_MODE){ qDebug() << "-File manager detected:" << FILEMAN; }
-}
-
void MountTray::slotOpenMediaDir(){
openMediaDir(MOUNTDIR);
}
@@ -315,7 +302,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() );
}
View
3 src-qt4/pc-mounttray/mountTray.h
@@ -58,7 +58,7 @@ private slots:
private:
DevCheck *DCheck;
- QString USERNAME, FILEMAN;
+ QString USERNAME;
QLocalSocket* devdProc;
QTimer *devdTimer;
int numMount, numAvail;
@@ -80,7 +80,6 @@ private slots:
bool addDevice(QString,QString,QString,QString);
void startupDevdProc();
void getInitialUsername();
- void getDefaultFileManager();
void loadSavedSettings();
void saveCurrentSettings();

No commit comments for this range

Something went wrong with that request. Please try again.