aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-12-29 11:29:38 -0500
committerKen Moore <ken@ixsystems.com>2016-12-29 11:29:38 -0500
commit3b4c76aa6f99275dbd625fc5050998d566117ee9 (patch)
treebab1debaa44592d1b516eef79e27d17e580ddedf /src-qt5
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-3b4c76aa6f99275dbd625fc5050998d566117ee9.tar.gz
lumina-3b4c76aa6f99275dbd625fc5050998d566117ee9.tar.bz2
lumina-3b4c76aa6f99275dbd625fc5050998d566117ee9.zip
New Feature for lumina-archiver:
If a *.img file is loaded, enable a new menu option/dialog for burning that image to a USB device. This is a front-end to the "dd" utility, and has full status reporting about the process as well. If the dd operation requires elevated permissions and qsudo is installed, also provide a prompt for switching to root permissions (with qsudo) and immediately re-opening the burn dialog with the same file.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.cpp29
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.h5
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.ui15
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp178
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/imgDialog.h61
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/imgDialog.ui239
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/lumina-archiver.pro9
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/main.cpp3
8 files changed, 529 insertions, 10 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
index 52831706..c98b64fb 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
@@ -12,10 +12,15 @@
#include <LuminaXDG.h>
#include <LUtils.h>
-#define TAREXT (
+#include "imgDialog.h"
+
+#include <unistd.h>
+
MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
ui->setupUi(this);
- this->setWindowTitle(tr("Archive Manager"));
+ QString title = tr("Archive Manager");
+ if( getuid()==0){ title.append(" ("+tr("Admin Mode")+")"); }
+ this->setWindowTitle(title);
BACKEND = new Backend(this);
connect(BACKEND, SIGNAL(ProcessStarting()), this, SLOT(ProcStarting()) );
connect(BACKEND, SIGNAL(ProcessFinished(bool, QString)), this, SLOT(ProcFinished(bool, QString)) );
@@ -36,6 +41,8 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
connect(ui->actionExtract_Sel, SIGNAL(triggered()), this, SLOT(extractSelection()) );
connect(ui->actionAdd_Dirs, SIGNAL(triggered()), this, SLOT(addDirs()) );
connect(ui->tree_contents, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(ViewFile(QTreeWidgetItem*)) );
+ connect(ui->actionUSB_Image, SIGNAL(triggered()), this, SLOT(BurnImgToUSB()) );
+
ui->progressBar->setVisible(false);
ui->label_progress->setVisible(false);
ui->label_progress_icon->setVisible(false);
@@ -43,6 +50,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
ui->actionRemove_File->setEnabled(false);
ui->actionExtract_All->setEnabled(false);
ui->actionAdd_Dirs->setEnabled(false);
+ ui->actionUSB_Image->setEnabled(false);
loadIcons();
ui->tree_contents->setHeaderLabels( QStringList() << tr("File") << tr("MimeType") << tr("Size")+" " );
}
@@ -52,10 +60,14 @@ MainUI::~MainUI(){
}
void MainUI::LoadArguments(QStringList args){
+ bool burnIMG = false;
for(int i=0; i<args.length(); i++){
+ if(args[i]=="--burn-img"){ burnIMG = true; continue; }
if(QFile::exists(args[i])){
ui->label_progress->setText(tr("Opening Archive..."));
BACKEND->loadFile(args[i]);
+ ui->actionUSB_Image->setEnabled(args[i].simplified().endsWith(".img"));
+ if(burnIMG){ BurnImgToUSB(); } //Go ahead and launch the burn dialog right away
break;
}
}
@@ -71,6 +83,7 @@ void MainUI::loadIcons(){
ui->actionRemove_File->setIcon( LXDG::findIcon("archive-remove","") );
ui->actionExtract_All->setIcon( LXDG::findIcon("archive-extract","") );
ui->actionExtract_Sel->setIcon( LXDG::findIcon("archive-extract","") );
+ ui->actionUSB_Image->setIcon( LXDG::findIcon("drive-removable-media-usb-pendrive","drive-removable-media-usb") );
}
//===================
@@ -135,7 +148,7 @@ QString MainUI::CreateFileTypes(){
QString MainUI::OpenFileTypes(){
QStringList types;
- types << QString(tr("All Types %1")).arg("(*.tar.gz *.tar.xz *.tar.bz *.tar.bz2 *.tar.lzma *.tar *.zip *.tgz *.txz *.tbz *.tbz2 *.tlz *.cpio *.pax *.ar *.shar *.7z *.iso *.xar *.jar *.rpm)");
+ types << QString(tr("All Types %1")).arg("(*.tar.gz *.tar.xz *.tar.bz *.tar.bz2 *.tar.lzma *.tar *.zip *.tgz *.txz *.tbz *.tbz2 *.tlz *.cpio *.pax *.ar *.shar *.7z *.iso *.img *.xar *.jar *.rpm)");
types << tr("Uncompressed Archive (*.tar)");
types << tr("GZip Compressed Archive (*.tar.gz *.tgz)");
types << tr("BZip Compressed Archive (*.tar.bz *.tbz)");
@@ -148,7 +161,7 @@ QString MainUI::OpenFileTypes(){
types << tr("SHAR Archive (*.shar)");
types << tr("Zip Archive (*.zip)");
types << tr("7-Zip Archive (*.7z)");
- types << tr("READ-ONLY: ISO image (*.iso)");
+ types << tr("READ-ONLY: ISO image (*.iso *.img)");
types << tr("READ-ONLY: XAR archive (*.xar)");
types << tr("READ-ONLY: Java archive (*.jar)");
types << tr("READ-ONLY: RedHat Package (*.rpm)");
@@ -166,6 +179,7 @@ void MainUI::NewArchive(){
}
ui->label_progress->setText(""); //just clear it (this action is instant)
BACKEND->loadFile(file);
+ ui->actionUSB_Image->setEnabled(file.endsWith(".img"));
}
void MainUI::OpenArchive(){
@@ -173,6 +187,7 @@ void MainUI::OpenArchive(){
if(file.isEmpty()){ return; }
ui->label_progress->setText(tr("Opening Archive..."));
BACKEND->loadFile(file);
+ ui->actionUSB_Image->setEnabled(file.endsWith(".img"));
}
void MainUI::addFiles(){
@@ -281,6 +296,12 @@ void MainUI::UpdateTree(){
ui->tree_contents->setEnabled(true);
}
+void MainUI::BurnImgToUSB(){
+ imgDialog dlg(this);
+ dlg.loadIMG(BACKEND->currentFile());
+ dlg.exec();
+}
+
//Backend Handling
void MainUI::ProcStarting(){
ui->progressBar->setRange(0,0);
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.h b/src-qt5/desktop-utils/lumina-archiver/MainUI.h
index bb462a7d..bf37d26a 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.h
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.h
@@ -1,5 +1,5 @@
//===========================================
-// Lumina-DE source code
+// Lumina-Desktop source code
// Copyright (c) 2016, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
@@ -48,7 +48,8 @@ private slots:
void ViewFile(QTreeWidgetItem *it);
void UpdateTree();
-
+ void BurnImgToUSB();
+
//Backend Handling
void ProcStarting();
void ProcFinished(bool, QString);
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.ui b/src-qt5/desktop-utils/lumina-archiver/MainUI.ui
index 45583ce3..6666b7cb 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.ui
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.ui
@@ -134,8 +134,15 @@
<addaction name="actionExtract_All"/>
<addaction name="actionExtract_Sel"/>
</widget>
+ <widget class="QMenu" name="menuBurn_toDisk">
+ <property name="title">
+ <string>Burn to Disk</string>
+ </property>
+ <addaction name="actionUSB_Image"/>
+ </widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
+ <addaction name="menuBurn_toDisk"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<widget class="QToolBar" name="toolBar">
@@ -220,6 +227,14 @@
<string>Extract Selection</string>
</property>
</action>
+ <action name="actionUSB_Image">
+ <property name="text">
+ <string>USB Image</string>
+ </property>
+ <property name="statusTip">
+ <string>Copy an IMG to a USB device (may require admin permission)</string>
+ </property>
+ </action>
</widget>
<resources/>
<connections/>
diff --git a/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp b/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp
new file mode 100644
index 00000000..13268a73
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-archiver/imgDialog.cpp
@@ -0,0 +1,178 @@
+//===========================================
+// Lumina-Desktop source code
+// Copyright (c) 2016, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#include "imgDialog.h"
+#include "ui_imgDialog.h"
+
+#include <QMessageBox>
+
+#include <LuminaOS.h>
+#include <LuminaXDG.h>
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <signal.h>
+
+imgDialog::imgDialog(QWidget *parent) : QDialog(parent), ui(new Ui::imgDialog()){
+ ui->setupUi(this); //load the designer form
+ QString title = tr("Burn IMG to Device");
+ if( getuid()==0){ title.append(" ("+tr("Admin Mode")+")"); }
+ this->setWindowTitle(title);
+ ui->frame_running->setVisible(false);
+ ui->frame_setup->setVisible(true);
+ ddProc = 0;
+ unitdiv = 1;
+ //Setup the signals/slots
+ ui->tool_refresh->setIcon( LXDG::findIcon("view-refresh","drive-removable-media-usb-pendrive") );
+ connect(ui->push_cancel, SIGNAL(clicked()), this, SLOT(cancel()) );
+ connect(ui->push_start, SIGNAL(clicked()), this, SLOT(start_process()) );
+ connect(ui->tool_refresh, SIGNAL(clicked()), this, SLOT(loadDeviceList()) );
+ loadDeviceList(); //do the initial load of the available devices
+ //Setup the possible transfer rate units
+ ui->combo_rate_units->clear();
+ ui->combo_rate_units->addItem(tr("Kilobyte(s)"), "k");
+ ui->combo_rate_units->addItem(tr("Megabyte(s)"), "m");
+ ui->combo_rate_units->addItem(tr("Gigabyte(s)"), "g");
+ ui->combo_rate_units->setCurrentIndex(1); //MB
+ //Setup the Process Timer
+ procTimer = new QTimer(this);
+ procTimer->setInterval(1000); //1 second updates
+ connect(procTimer, SIGNAL(timeout()), this, SLOT(getProcStatus()) );
+ //Determine which type of system this is for the process status signal
+ BSD_signal = LOS::OSName().contains("BSD"); //assume everything else is Linux-like
+}
+
+imgDialog::~imgDialog(){
+
+}
+
+void imgDialog::loadIMG(QString filepath){
+ ui->label_iso->setText(filepath.section("/",-1)); //only show the filename
+ ui->label_iso->setWhatsThis(filepath); //save the full path for later
+}
+
+//============================
+// PRIVATE SLOTS
+//============================
+void imgDialog::start_process(){
+ //Sanity Checks
+ if( !QFile::exists(ui->combo_devices->currentData().toString()) ){ loadDeviceList(); return; } //USB device no longer available
+ if(!QFile::exists(ui->label_iso->whatsThis()) ){ return; } //IMG file no longer available
+ qDebug() << "Start Process...";
+ //Read the size of the img file
+ QString units = ui->combo_rate_units->currentData().toString();
+ if(units=="k"){ unitdiv = 1024; }
+ else if(units=="m"){ unitdiv = 1024*1024; }
+ else if(units=="g"){ unitdiv = 1024*1024*1024; }
+ qint64 bytes = QFileInfo(ui->label_iso->whatsThis()).size();
+ //qDebug() << "IMG File size:" << bytes;
+ //Set the progressBar maximum
+ ui->progressBar->setRange(0, qRound(bytes/unitdiv) );
+ ui->progressBar->setValue(0);
+ ui->label_dev->setText( ui->combo_devices->currentText() );
+ ui->label_time->setText("0:00");
+ ui->frame_running->setVisible(true);
+ ui->frame_setup->setVisible(false);
+ //qDebug() << "Blocks:" << ui->progressBar->maximum();
+ //Initialize the process
+ if(ddProc==0){
+ ddProc = new QProcess(this);
+ connect(ddProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(procFinished()) );
+ connect(ddProc, SIGNAL(readyRead()), this, SLOT(procInfoAvailable()) );
+ ddProc->setProcessChannelMode(QProcess::MergedChannels);
+ }
+ //Generate the command
+ QString prog; QStringList args;
+ //if( ::getuid()!=0){ prog = "qsudo"; args<<"dd"; }
+ //else{
+ prog = "dd";
+ //}
+ args << "if="+ui->label_iso->whatsThis();
+ args << "of="+ui->combo_devices->currentData().toString();
+ args << "bs="+QString::number(ui->spin_rate_num->value())+units;
+ if(ui->check_sync->isChecked()){ args << "conv=sync"; }
+ //Start the process
+ startTime = QDateTime::currentDateTime();
+ ddProc->start(prog, args);
+ //Start the timer to watch for updates
+ procTimer->start();
+ ui->push_start->setEnabled(false);
+}
+
+void imgDialog::cancel(){
+ if(ddProc==0 || ddProc->state()==QProcess::NotRunning){
+ this->close();
+ }else{
+ //Prompt if the transfer should be cancelled
+ if(QMessageBox::Yes == QMessageBox::question(this, tr("Cancel Image Burn?"), tr("Do you wish to stop the current IMG burn process?")+"\n\n"+tr("Warning: This will leave the USB device in an inconsistent state")) ){
+ ddProc->kill();
+ }
+ }
+}
+
+void imgDialog::loadDeviceList(){
+ ui->combo_devices->clear();
+ //Probe the system for USB devices
+ QDir devDir("/dev");
+ QString filter = (BSD_signal) ? "da*" : "sd*";
+ QStringList usb = devDir.entryList(QStringList() << filter, QDir::System, QDir::Name);
+ //Filter out any devices which are currently mounted/used
+
+ //Create the list
+ for(int i=0; i<usb.length(); i++){
+ ui->combo_devices->addItem(usb[i], devDir.absoluteFilePath(usb[i]));
+ }
+}
+
+void imgDialog::getProcStatus(){
+ if(ddProc==0 || ddProc->state()!=QProcess::Running ){ return; }
+ QStringList pidlist = LUtils::getCmdOutput("pgrep -S -f \"dd if="+ui->label_iso->whatsThis()+"\"");
+ if(pidlist.isEmpty()){ return; }
+ int pid = pidlist.first().simplified().toInt(); //just use the first pid - the pgrep should be detailed enough to only match one
+ //qDebug() << "Sending signal to show status on PID:" << pid;
+ if(BSD_signal){ ::kill(pid, SIGINFO); } //On BSD systems, the INFO signal is used to poke dd for status updates
+ else{ ::kill(pid, SIGUSR1); } //On linux systems, the USR1 signal is used to poke dd for status updates
+ //Now update the elapsed time on the UI
+ int elapsed = startTime.secsTo( QDateTime::currentDateTime() );
+ int min = elapsed/60;
+ int secs = elapsed%60;
+ ui->label_time->setText( QString::number(min)+":"+ (secs < 10 ? "0" : "")+QString::number(secs) );
+}
+
+void imgDialog::procInfoAvailable(){
+ lastmsg = ddProc->readAll();
+ if(lastmsg.endsWith("\n")){ lastmsg.chop(1); }
+ //qDebug() << "Got Process Info:" << lastmsg;
+ //Now look for the " bytes transferred" line
+ QStringList records = lastmsg.split("\n").filter(" bytes transferred ");
+ if(!records.isEmpty()){
+ //Update the progress bar
+ //qDebug() << "Got status update:" << records.last();
+ ui->progressBar->setValue( qRound(records.last().section(" bytes",0,0).toDouble()/unitdiv) );
+ }
+}
+
+void imgDialog::procFinished(){
+ qDebug() << "Process Finished:" << ddProc->exitCode();
+ procTimer->stop();
+ ui->frame_running->setVisible(false);
+ ui->frame_setup->setVisible(true);
+ if(ddProc->exitStatus()==QProcess::NormalExit){
+ if(ddProc->exitCode() !=0 ){
+ if(lastmsg.contains("permission denied", Qt::CaseInsensitive) && LUtils::isValidBinary("qsudo") ){
+ if(QMessageBox::Yes == QMessageBox::question(this, tr("Administrator Permissions Needed"), tr("This operation requires administrator priviledges.")+"\n\n"+tr("Would you like to enable these priviledges?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) ){
+ QProcess::startDetached("qsudo", QStringList() << "lumina-archiver" << "--burn-img" << ui->label_iso->whatsThis());
+ exit(0);
+ }
+ }else{
+ QMessageBox::warning(this, tr("ERROR"), tr("The process could not be completed:")+"\n\n"+lastmsg);
+ }
+ }else{
+ QMessageBox::information(this, tr("SUCCESS"), tr("The image was successfully burned to the USB device") );
+ this->close();
+ }
+ }
+}
diff --git a/src-qt5/desktop-utils/lumina-archiver/imgDialog.h b/src-qt5/desktop-utils/lumina-archiver/imgDialog.h
new file mode 100644
index 00000000..943e3ebd
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-archiver/imgDialog.h
@@ -0,0 +1,61 @@
+//===========================================
+// Lumina-Desktop source code
+// Copyright (c) 2016, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+// Dialog front-end for the "dd" utility to burn an IMG file to a USB stick
+//===========================================
+#ifndef _LUMINA_ARCHIVER_IMAGE_DIALOG_H
+#define _LUMINA_ARCHIVER_IMAGE_DIALOG_H
+#include <QDialog>
+#include <QTimer>
+#include <QProcess>
+#include <QCloseEvent>
+#include <QDebug>
+#include <QDateTime>
+
+ namespace Ui{
+ class imgDialog;
+};
+
+class imgDialog : public QDialog{
+ Q_OBJECT
+public:
+ imgDialog(QWidget *parent = 0);
+ ~imgDialog();
+
+ void loadIMG(QString filepath);
+
+private:
+ Ui::imgDialog *ui;
+ QProcess *ddProc;
+ QTimer *procTimer;
+ bool BSD_signal;
+ QString lastmsg;
+ double unitdiv;
+ QDateTime startTime;
+private slots:
+ void start_process();
+ void cancel();
+ void loadDeviceList();
+
+ void getProcStatus();
+ void procInfoAvailable();
+ void procFinished();
+
+protected:
+ void closeEvent(QCloseEvent *ev){
+ if(ddProc==0 || ddProc->state()==QProcess::NotRunning){
+ //Nothing special going on
+ QDialog::closeEvent(ev); //normal close procedure
+ }else{
+ //Process running - run the cancel routine first
+ ev->ignore();
+ QTimer::singleShot(0, this, SLOT(cancel()) );
+ }
+ };
+
+};
+
+#endif
diff --git a/src-qt5/desktop-utils/lumina-archiver/imgDialog.ui b/src-qt5/desktop-utils/lumina-archiver/imgDialog.ui
new file mode 100644
index 00000000..4c8d3c2e
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-archiver/imgDialog.ui
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>imgDialog</class>
+ <widget class="QDialog" name="imgDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>311</width>
+ <height>263</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Burn IMG to device</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_iso">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>IMG File</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame_setup">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Block Size</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QSpinBox" name="spin_rate_num">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>1023</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="combo_rate_units"/>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>USB Device</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QComboBox" name="combo_devices"/>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_refresh">
+ <property name="toolTip">
+ <string>Refresh Device List</string>
+ </property>
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QCheckBox" name="check_sync">
+ <property name="text">
+ <string>Wipe all extra space on device (conv = sync)</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame_running">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
+ <item>
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Burning to USB:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_dev">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string notr="true">device</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar">
+ <property name="value">
+ <number>24</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Time Elapsed:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_time">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string notr="true">time</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="push_cancel">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="push_start">
+ <property name="text">
+ <string>Start</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src-qt5/desktop-utils/lumina-archiver/lumina-archiver.pro b/src-qt5/desktop-utils/lumina-archiver/lumina-archiver.pro
index 5c35af2c..ecb6727f 100644
--- a/src-qt5/desktop-utils/lumina-archiver/lumina-archiver.pro
+++ b/src-qt5/desktop-utils/lumina-archiver/lumina-archiver.pro
@@ -11,13 +11,16 @@ include(../../core/libLumina/LuminaXDG.pri)
include(../../core/libLumina/LuminaThemes.pri)
HEADERS += MainUI.h \
- TarBackend.h
+ TarBackend.h \
+ imgDialog.h
SOURCES += main.cpp \
MainUI.cpp \
- TarBackend.cpp
+ TarBackend.cpp \
+ imgDialog.cpp
-FORMS += MainUI.ui
+FORMS += MainUI.ui \
+ imgDialog.ui
TRANSLATIONS = i18n/l-archiver_af.ts \
i18n/l-archiver_ar.ts \
diff --git a/src-qt5/desktop-utils/lumina-archiver/main.cpp b/src-qt5/desktop-utils/lumina-archiver/main.cpp
index ccd85902..4f9a4bc5 100644
--- a/src-qt5/desktop-utils/lumina-archiver/main.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/main.cpp
@@ -19,7 +19,8 @@ int main(int argc, char *argv[]) {
//Now go ahead and setup the app
QStringList args;
for(int i=1; i<argc; i++){
- args << LUtils::PathToAbsolute( QString(argv[i]) );
+ if( QString(argv[i]).startsWith("--") ){ args << QString(argv[i]); }
+ else{ args << LUtils::PathToAbsolute( QString(argv[i]) ); }
}
//Now start the window
MainUI W;
bgstack15