diff options
author | q5sys <jt@xsystems.com> | 2017-10-24 17:15:58 -0400 |
---|---|---|
committer | q5sys <jt@xsystems.com> | 2017-10-24 17:15:58 -0400 |
commit | 2065eaea73177ccb66f24c7ba433abe67f11b31c (patch) | |
tree | a2b85e1bfcce419279423c748af5610e2520451c /src-qt5/desktop-utils | |
parent | change thumbnail generation to faster method tested in lumina-fm-dev (diff) | |
download | lumina-2065eaea73177ccb66f24c7ba433abe67f11b31c.tar.gz lumina-2065eaea73177ccb66f24c7ba433abe67f11b31c.tar.bz2 lumina-2065eaea73177ccb66f24c7ba433abe67f11b31c.zip |
warning banner for running lumina-fm as root_
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.cpp | 2 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/MainUI.h | 1 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 4 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui | 14 |
4 files changed, 19 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index abb99975..50cc110a 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -25,6 +25,8 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ //qRegisterMetaType< QVector<int> >("QVector<int>"); //qRegisterMetaType< QList<QPersistentModelIndex> >("QList<QPersistentModelIndex>"); waitingToClose = false; + //put if statement here to check if running as root + rootmode = false; 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 492ba533..d03ca443 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.h +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.h @@ -67,6 +67,7 @@ class MainUI : public QMainWindow{ public: MainUI(); ~MainUI(); + 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 1b00343d..93a8fec4 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -30,6 +30,10 @@ 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); + //} ID = objID; //Assemble the toolbar for the widget toolbar = new QToolBar(this); diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui index b1ba9d95..b4d8d933 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>400</width> - <height>350</height> + <height>389</height> </rect> </property> <property name="minimumSize"> @@ -19,7 +19,17 @@ <property name="windowTitle"> <string>Form</string> </property> - <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0"> + <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,1,0"> + <item> + <widget class="QLabel" name="label_rootmode"> + <property name="text"> + <string>Warning - Running as Root</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> <item> <layout class="QHBoxLayout" name="toolbar_layout"/> </item> |