aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/Browser.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.cpp8
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.h3
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.ui5
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp4
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui22
6 files changed, 41 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp
index 10c2567b..29cc5a99 100644
--- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp
@@ -64,7 +64,7 @@ void Browser::loadItem(QString info, Browser *obj){
file.close();
pix.loadFromData(bytes);
if(pix.width() > 256 || pix.height() > 256 ){
- pix = pix.scaled(256,256, Qt::KeepAspectRatio);
+ pix = pix.scaled(256,256, Qt::KeepAspectRatio, Qt::FastTransformation);
}
}
}
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
index abb99975..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 <LUtils.h>
#include <LDesktopUtils.h>
+#include <ExternalProcess.h>
#define DEBUG 0
@@ -25,6 +26,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:"; }
@@ -962,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 492ba533..04e8199e 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
@@ -176,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 @@
<string>Ctrl+P</string>
</property>
</action>
+ <action name="actionOpen_as_Root">
+ <property name="text">
+ <string>Open as Root</string>
+ </property>
+ </action>
</widget>
<resources/>
<connections/>
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..099fd91a 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,25 @@
<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="font">
+ <font>
+ <family>Droid Sans Mono</family>
+ <weight>75</weight>
+ <italic>false</italic>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string> * - FILE MANAGER RUNNING AS ROOT- * </string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
<item>
<layout class="QHBoxLayout" name="toolbar_layout"/>
</item>
bgstack15