diff options
author | Ken Moore <moorekou@gmail.com> | 2014-10-08 09:16:10 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2014-10-08 09:16:10 -0400 |
commit | 4897f2a844a9901e6278665f83716b3974a5078b (patch) | |
tree | efb98920ebd16cfa9342dd392601a25fa9f12916 /lumina-desktop | |
parent | Merge pull request #15 from Nanolx/master (diff) | |
parent | make file-manager user-chooseable (diff) | |
download | lumina-4897f2a844a9901e6278665f83716b3974a5078b.tar.gz lumina-4897f2a844a9901e6278665f83716b3974a5078b.tar.bz2 lumina-4897f2a844a9901e6278665f83716b3974a5078b.zip |
Merge pull request #16 from Nanolx/side-work
make file-manager user-chooseable
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/AppMenu.cpp | 6 | ||||
-rw-r--r-- | lumina-desktop/AppMenu.h | 8 | ||||
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 3 |
3 files changed, 11 insertions, 6 deletions
diff --git a/lumina-desktop/AppMenu.cpp b/lumina-desktop/AppMenu.cpp index 496d0932..2b14edec 100644 --- a/lumina-desktop/AppMenu.cpp +++ b/lumina-desktop/AppMenu.cpp @@ -6,6 +6,7 @@ //=========================================== #include "AppMenu.h" #include "LSession.h" +#include "LDesktop.h" #include <LuminaOS.h> AppMenu::AppMenu(QWidget* parent) : QMenu(parent){ @@ -111,8 +112,9 @@ void AppMenu::launchControlPanel(){ } void AppMenu::launchFileManager(){ - LSession::LaunchApplication("lumina-fm"); - //QProcess::startDetached("lumina-fm"); + QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina"); + QString fm = QSettings("LuminaDE", "desktopsettings").value("default-filemanager","lumina-fm").toString(); + LSession::LaunchApplication(fm); } void AppMenu::launchApp(QAction *act){ diff --git a/lumina-desktop/AppMenu.h b/lumina-desktop/AppMenu.h index 1657d9e2..2d737284 100644 --- a/lumina-desktop/AppMenu.h +++ b/lumina-desktop/AppMenu.h @@ -19,6 +19,7 @@ #include <QDateTime> #include <QHash> #include <QAction> +#include <QSettings> //#include <QProcess> // libLumina includes @@ -29,18 +30,19 @@ class AppMenu : public QMenu{ public: AppMenu(QWidget *parent = 0); ~AppMenu(); - + QHash<QString, QList<XDGDesktop> > *currentAppHash(); QDateTime lastHashUpdate; private: + QSettings *settings; QFileSystemWatcher *watcher; QString appstorelink, controlpanellink; QList<QMenu> MLIST; QHash<QString, QList<XDGDesktop> > APPS; - + void updateAppList(); //completely update the menu lists - + private slots: void start(); //This is called in a new thread after initialization void watcherUpdate(); diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index 22606cf4..a76edb53 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -91,7 +91,8 @@ void LDesktop::SystemTerminal(){ } void LDesktop::SystemFileManager(){ - LSession::LaunchApplication("lumina-fm"); + QString fm = settings->value("default-filemanager","lumina-fm").toString(); + LSession::LaunchApplication(fm); } void LDesktop::SystemApplication(QAction* act){ |