diff options
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 3 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.h | 2 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 7 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 2d4cfe84..87c3a0f8 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -17,6 +17,7 @@ #include <ExternalProcess.h> #define DEBUG 0 +bool rootmode = false; MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ //for Signal/slot we must register the Typedef of QFileInfoList @@ -27,7 +28,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ //qRegisterMetaType< QList<QPersistentModelIndex> >("QList<QPersistentModelIndex>"); waitingToClose = false; //put if statement here to check if running as root - rootmode = false; + rootmode = (getuid()==0); ui->setupUi(this); if(DEBUG){ qDebug() << "Initilization:"; } diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h index 04e8199e..04b80f28 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.h +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.h @@ -67,7 +67,7 @@ class MainUI : public QMainWindow{ public: MainUI(); ~MainUI(); - bool rootmode; + //bool rootmode; public slots: void OpenDirs(QStringList); //also called from the main.cpp after initialization diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp index 6f1624a4..a8cbea2c 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -27,13 +27,12 @@ #include "../ScrollDialog.h" #define DEBUG 0 +extern bool rootmode; DirWidget::DirWidget(QString objID, QSettings *settings, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){ ui->setupUi(this); //load the designer file - //if(rootmode = true){ui->label_rootmode->setVisible(true);} - //else{ - //ui->label_rootmode->setVisible(false); - //} + ui->label_rootmode->setVisible(rootmode); + ID = objID; //Assemble the toolbar for the widget toolbar = new QToolBar(this); |