From ec3905d61bdbd873b416e04e896a597c3730730a Mon Sep 17 00:00:00 2001 From: q5sys Date: Mon, 4 Sep 2017 20:52:38 -0400 Subject: write auto-archival methods for file manager integration --- src-qt5/desktop-utils/lumina-archiver/MainUI.cpp | 14 ++++++++++++++ src-qt5/desktop-utils/lumina-archiver/MainUI.h | 3 ++- src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp | 1 + src-qt5/desktop-utils/lumina-archiver/TarBackend.h | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp index afead9af..9d220824 100644 --- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp @@ -72,9 +72,11 @@ MainUI::~MainUI(){ void MainUI::LoadArguments(QStringList args){ bool burnIMG = false; bool autoExtract = false; + //bool autoArchive = false; for(int i=0; ilabel_progress->setText(tr("Opening Archive...")); if(autoExtract){ @@ -86,6 +88,14 @@ void MainUI::LoadArguments(QStringList args){ if(burnIMG){ BurnImgToUSB(); } //Go ahead and launch the burn dialog right away break; } + //if(autoArchive){ + //get rest of arguments + //for(int i=1; istartExtract(dir, true); } +/* +void MainUI::autoArchiveFiles(aaFileList){ +*/ + void MainUI::extractSelection(){ if(ui->tree_contents->currentItem()==0){ return; } //nothing selected QList 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 61475fb2..a2687895 100644 --- a/src-qt5/desktop-utils/lumina-archiver/MainUI.h +++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.h @@ -25,7 +25,7 @@ public: void LoadArguments(QStringList); void loadIcons(); - + //QStringList aaFileList; private: Ui::MainUI *ui; @@ -47,6 +47,7 @@ private slots: void remFiles(); void extractFiles(); void autoextractFiles(); + //void autoArchiveFiles(QStringList aaFileList); void extractSelection(); void ViewFile(QTreeWidgetItem *it); void UpdateTree(); diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp index 9fe735a3..e0b802a4 100644 --- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp @@ -262,6 +262,7 @@ void Backend::procFinished(int retcode, QProcess::ExitStatus){ } } if(args.contains("-x")){ result = tr("Extraction Finished"); emit ExtractSuccessful(); } + //if(args.contains("-aa")){ result = tr("Archival Finished"); emit ArchivalSuccessful(); } else if(args.contains("-c")){ result = tr("Modification Finished"); } if(needupdate){ startList(); } else{ emit ProcessFinished(retcode==0, result); result.clear(); } diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.h b/src-qt5/desktop-utils/lumina-archiver/TarBackend.h index dd08361c..d86ecf7c 100644 --- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.h +++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.h @@ -64,6 +64,7 @@ signals: void ProcessStarting(); void ProgressUpdate(int, QString); //percentage, text void ProcessFinished(bool, QString); //success, text + //void ArchivalSuccessful(); }; #endif -- cgit