aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.cpp51
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.h4
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/main.cpp2
-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
-rw-r--r--src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp2
10 files changed, 81 insertions, 22 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
index 215fc64e..c4b35474 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
@@ -82,6 +82,7 @@ void MainUI::LoadArguments(QStringList args){
else if(args[i]=="--burn-img"){ action = 0; continue; }
else if(args[i]=="--ax"){ action = 1; continue; }
else if(args[i]=="--aa"){ action = 2; continue; }
+ else if(args[i]=="--sx"){ action = 3; continue; }
}else{
files << args[i];
}
@@ -90,6 +91,7 @@ void MainUI::LoadArguments(QStringList args){
//Now go through and do any actions as needed
ui->label_progress->setText(tr("Opening Archive..."));
if(action==1){
+ qDebug() << "blah";
connect(BACKEND, SIGNAL(FileLoaded()), this, SLOT(autoextractFiles()) );
connect(BACKEND, SIGNAL(ExtractSuccessful()), delayClose, SLOT(start()) );
}else if(action==2){
@@ -97,6 +99,18 @@ void MainUI::LoadArguments(QStringList args){
for(int j=1; j<files.length(); j++){ aaFileList << files[j]; }
connect(BACKEND, SIGNAL(FileLoaded()), this, SLOT(autoArchiveFiles()) );
connect(BACKEND, SIGNAL(ArchivalSuccessful()), delayClose, SLOT(start()) );
+ }else if(action==3){
+ sxList.clear();
+ for(int j=0; j<files.length(); j++){ sxList << files[j]; }
+ for(int k=0; k<sxList.length(); k++){
+ if(k==0){ sxFile = sxList[k]; }
+ if(k==1){ sxPath = sxList[k]; }
+ }
+ qDebug() << "sxList" << sxList;
+ qDebug() << "sxFile" << sxFile;
+ qDebug() << "sxPath" << sxPath;
+ connect(BACKEND, SIGNAL(FileLoaded()), this, SLOT(simpleExtractFiles()) );
+ connect(BACKEND, SIGNAL(ExtractSuccessful()), delayClose, SLOT(start()) );
}
BACKEND->loadFile(files[0]);
ui->actionUSB_Image->setEnabled(files[0].simplified().endsWith(".img"));
@@ -260,23 +274,29 @@ void MainUI::extractFiles(){
}
void MainUI::autoextractFiles(){
- disconnect(BACKEND, SIGNAL(FileLoaded()), this, SLOT(autoextractFiles()) );
- QString dir = BACKEND->currentFile().section("/",0,-2); //parent directory of the archive
- if(dir.isEmpty()){ return; }
- QDir tmp(dir);
- QString name = BACKEND->currentFile().section("/",-1).section(".",0,0);
- if(QFile::exists(dir+"/"+name)){
- int num = 1;
- while( QFile::exists(dir+"/"+name+"_"+QString::number(num))){ num++; }
- name = name+"_"+QString::number(num);
- }
- if(tmp.mkdir(name) ){
- dir.append("/"+name); //created sub directory
- }
- ui->label_progress->setText(tr("Extracting..."));
- BACKEND->startExtract(dir, true);
+ disconnect(BACKEND, SIGNAL(FileLoaded()), this, SLOT(autoextractFiles()) );
+ QString dir = BACKEND->currentFile().section("/",0,-2); //parent directory of the archive
+ if(dir.isEmpty()){ return; }
+ QDir tmp(dir);
+ QString name = BACKEND->currentFile().section("/",-1).section(".",0,0);
+ if(QFile::exists(dir+"/"+name)){
+ int num = 1;
+ while( QFile::exists(dir+"/"+name+"_"+QString::number(num))){ num++; }
+ name = name+"_"+QString::number(num);
+ }
+ if(tmp.mkdir(name) ){
+ dir.append("/"+name); //created sub directory
}
+ ui->label_progress->setText(tr("Extracting..."));
+ BACKEND->startExtract(dir, true);
+}
+void MainUI::simpleExtractFiles(){
+ disconnect(BACKEND, SIGNAL(FileLoaded()), this, SLOT(autoextractFiles()) );
+ QString dir = sxPath;
+ ui->label_progress->setText(tr("Extracting..."));
+ BACKEND->startExtract(dir, true);
+}
void MainUI::autoArchiveFiles(){
qDebug() << "Auto Archive Files:" << aaFileList;
@@ -284,7 +304,6 @@ void MainUI::autoArchiveFiles(){
BACKEND->startAdd(aaFileList);
}
-
void MainUI::extractSelection(){
if(ui->tree_contents->currentItem()==0){ return; } //nothing selected
QList<QTreeWidgetItem*> sel = ui->tree_contents->selectedItems();
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.h b/src-qt5/desktop-utils/lumina-archiver/MainUI.h
index a16d5862..1a9d287c 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.h
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.h
@@ -30,7 +30,8 @@ public:
private:
Ui::MainUI *ui;
Backend *BACKEND;
- QStringList aaFileList;
+ QStringList aaFileList, sxList;
+ QString sxPath, sxFile;
QTimer *delayClose;
QTreeWidgetItem* findItem(QString path, QTreeWidgetItem *start = 0);
@@ -49,6 +50,7 @@ private slots:
void extractFiles();
void autoextractFiles();
void autoArchiveFiles();
+ void simpleExtractFiles();
void extractSelection();
void ViewFile(QTreeWidgetItem *it);
void UpdateTree();
diff --git a/src-qt5/desktop-utils/lumina-archiver/main.cpp b/src-qt5/desktop-utils/lumina-archiver/main.cpp
index 40cd7967..01e7bda1 100644
--- a/src-qt5/desktop-utils/lumina-archiver/main.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/main.cpp
@@ -15,7 +15,7 @@
int main(int argc, char *argv[]) {
LTHEME::LoadCustomEnvSettings();
QApplication a(argc, argv);
- a.setAttribute(Qt::AA_UseHighDpiPixmaps);
+ a.setAttribute(Qt::AA_UseHighDpiPixmaps);
LUtils::LoadTranslation(&a, "l-archiver");
//Now go ahead and setup the app
QStringList args;
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>
diff --git a/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp
index 7b34935e..1ad6edcd 100644
--- a/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp
+++ b/src-qt5/desktop-utils/lumina-xdg-entry/mainwindow.cpp
@@ -1,7 +1,7 @@
//===========================================
// Copyright (c) 2017, q5sys (JT)
// Available under the MIT license
-// See the LICENSE file for full details
+// See the LICENSE file for full details
//===========================================
#include "mainwindow.h"
bgstack15