diff options
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core-utils/lumina-config/mainUI.cpp | 10 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src-qt5/core-utils/lumina-config/mainUI.cpp b/src-qt5/core-utils/lumina-config/mainUI.cpp index 5062a5ef..bd2bf695 100644 --- a/src-qt5/core-utils/lumina-config/mainUI.cpp +++ b/src-qt5/core-utils/lumina-config/mainUI.cpp @@ -1136,7 +1136,8 @@ void MainUI::changeDefaultEmail(){ desk.filePath=""; } //save the new app setting and adjust the button appearance - appsettings->setValue("default/email", desk.filePath); + LXDG::setDefaultAppForMime("application/email",desk.filePath); + // appsettings->setValue("default/email", desk.filePath); QString tmp = desk.filePath; if(tmp.endsWith(".desktop")){ bool ok = false; @@ -1200,7 +1201,8 @@ void MainUI::changeDefaultTerminal(){ desk.filePath="xterm"; } //save the new app setting and adjust the button appearance - sessionsettings->setValue("default-terminal", desk.filePath); + LXDG::setDefaultAppForMime("application/terminal",desk.filePath); + //sessionsettings->setValue("default-terminal", desk.filePath); QString tmp = desk.filePath; if(tmp.endsWith(".desktop")){ bool ok = false; @@ -1249,7 +1251,7 @@ void MainUI::loadDefaultSettings(){ ui->tool_default_filemanager->setIcon( LXDG::findIcon("application-x-executable","") ); } // - Default Terminal - tmp = sessionsettings->value("default-terminal", "xterm").toString(); + tmp =LXDG::findDefaultAppForMime("application/terminal"); //sessionsettings->value("default-terminal", "xterm").toString(); if( !QFile::exists(tmp) && !LUtils::isValidBinary(tmp) ){ qDebug() << "Invalid Settings:" << tmp; tmp.clear(); } //invalid settings if(tmp.endsWith(".desktop")){ bool ok = false; @@ -1293,7 +1295,7 @@ void MainUI::loadDefaultSettings(){ ui->tool_default_webbrowser->setIcon( LXDG::findIcon("application-x-executable","") ); } // - Default Email Client - tmp = appsettings->value("default/email", "").toString(); + tmp = LXDG::findDefaultAppForMime("application/email"); //appsettings->value("default/email", "").toString(); if( !QFile::exists(tmp) && !LUtils::isValidBinary(tmp) ){ qDebug() << "Invalid Settings:" << tmp; tmp.clear(); } //invalid settings if(tmp.endsWith(".desktop")){ bool ok = false; diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 010df40d..5b0497d2 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -720,8 +720,8 @@ void MainUI::OpenTerminal(QString dirpath){ //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(); - //qDebug() << "Found default terminal:" << defTerminal; + QString defTerminal = LXDG::findDefaultAppForMime("application/terminal"); //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); //qDebug() << "Starting Terminal with command:" << cmd; |