From 11749b3b8eb4665098a0341312104e5b05c6f55c Mon Sep 17 00:00:00 2001 From: q5sys Date: Tue, 24 Oct 2017 17:30:02 -0400 Subject: add logic for launching lumina-fm as root --- src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 6 ++++++ src-qt5/desktop-utils/lumina-fm/MainUI.h | 2 ++ src-qt5/desktop-utils/lumina-fm/MainUI.ui | 5 +++++ src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui | 10 +++++++++- 4 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src-qt5') diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 50cc110a..2d4cfe84 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -14,6 +14,7 @@ #include #include +#include #define DEBUG 0 @@ -964,3 +965,8 @@ void MainUI::closeEvent(QCloseEvent *ev){ } QMainWindow::closeEvent(ev); //continue normal close routine } + +void MainUI::on_actionOpen_as_Root_triggered() +{ + ExternalProcess::launch("qsudo lumina-fm"); +} diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h index d03ca443..04e8199e 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.h +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.h @@ -177,6 +177,8 @@ private slots: void TrayJobsFinished(); + void on_actionOpen_as_Root_triggered(); + signals: void Si_AdaptStatusBar(QFileInfoList fileList, QString path, QString messageFolders, QString messageFiles); diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.ui b/src-qt5/desktop-utils/lumina-fm/MainUI.ui index 744f31a3..56de9b7c 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.ui +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.ui @@ -434,6 +434,11 @@ Ctrl+P + + + Open as Root + + diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui index b4d8d933..099fd91a 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui @@ -22,8 +22,16 @@ + + + Droid Sans Mono + 75 + false + true + + - Warning - Running as Root + * - FILE MANAGER RUNNING AS ROOT- * Qt::AlignCenter -- cgit