aboutsummaryrefslogtreecommitdiff
path: root/lumina-fm
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-09-17 08:55:09 -0400
committerKen Moore <moorekou@gmail.com>2015-09-17 08:55:09 -0400
commit496cf68b3c894d596c29ced3350763e66477d835 (patch)
treea665df6accacdbe745472c38afa78a510c0c5967 /lumina-fm
parentAdd a LUtils function for assembling the command to open a terminal in a part... (diff)
downloadlumina-496cf68b3c894d596c29ced3350763e66477d835.tar.gz
lumina-496cf68b3c894d596c29ced3350763e66477d835.tar.bz2
lumina-496cf68b3c894d596c29ced3350763e66477d835.zip
Update lumina-fm to use the new LUtils::GenerateOpenTerminalExec() function for opening a terminal in a directory.
Diffstat (limited to 'lumina-fm')
-rw-r--r--lumina-fm/MainUI.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp
index 6a7f9b74..bdcbd75b 100644
--- a/lumina-fm/MainUI.cpp
+++ b/lumina-fm/MainUI.cpp
@@ -610,16 +610,14 @@ void MainUI::OpenImages(LFileInfoList list){
}
void MainUI::OpenTerminal(QString dirpath){
- //QFileInfoList sel = getSelectedItems();
- QString shell;
- //we get the shell has defined in the environment
- if (getenv("SHELL")) shell = QString(getenv("SHELL"));
- else shell = QString("/bin/sh");
- //we use the application defined as thate default terminal
- QSettings *sessionsettings = new QSettings( QSettings::UserScope, "LuminaDE","sessionsettings", this);
+ //we use the application defined as the default terminal
+ QSettings sessionsettings( QSettings::UserScope, "LuminaDE","sessionsettings", this);
//xterm remains the default
- QString defTerminal = sessionsettings->value("default-terminal", "xterm").toString();
- if(defTerminal.endsWith(".desktop")){
+ QString defTerminal = sessionsettings.value("default-terminal", "xterm").toString();
+ qDebug() << "Found default terminal:" << defTerminal;
+ //Now get the exec string and run it
+ QString cmd = LUtils::GenerateOpenTerminalExec(defTerminal, dirpath);
+ /*if(defTerminal.endsWith(".desktop")){
//Pull the binary name out of the shortcut
bool ok = false;
XDGDesktop DF = LXDG::loadDesktopFile(defTerminal,ok);
@@ -633,7 +631,9 @@ void MainUI::OpenTerminal(QString dirpath){
//-e is the parameter for most of the terminal appliction to execute an external command.
//In your case we start a shell in the selected directory
- QProcess::startDetached(defTerminal + " -e \"cd " + dirpath + " && " + shell + " \" ");
+ QProcess::startDetached(defTerminal + " -e \"cd " + dirpath + " && " + shell + " \" ");*/
+ qDebug() << "Starting Terminal with command:" << cmd;
+ QProcess::startDetached(cmd);
}
bgstack15