aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-11-30 14:07:37 -0500
committerKen Moore <ken@ixsystems.com>2016-11-30 14:07:37 -0500
commit6953a388620a15cd2e4d5620b32da5492abff9b9 (patch)
tree06a732c41cbc626b210a09129ff1a2cc746f55e9 /src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
parentFix up the permissions of extracted files via lumina-archiver. (diff)
downloadlumina-6953a388620a15cd2e4d5620b32da5492abff9b9.tar.gz
lumina-6953a388620a15cd2e4d5620b32da5492abff9b9.tar.bz2
lumina-6953a388620a15cd2e4d5620b32da5492abff9b9.zip
Allow for multi-selection of items for extractions.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver/MainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
index 9d41374c..52831706 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
@@ -208,12 +208,16 @@ void MainUI::extractFiles(){
}
void MainUI::extractSelection(){
- if(ui->tree_contents->currentItem()==0){ return; }
- QString sel = ui->tree_contents->currentItem()->whatsThis(0);
+ if(ui->tree_contents->currentItem()==0){ return; } //nothing selected
+ QList<QTreeWidgetItem*> sel = ui->tree_contents->selectedItems();
+ if(sel.isEmpty()){ sel << ui->tree_contents->currentItem(); }
+ QStringList selList;
+ for(int i=0; i<sel.length(); i++){ selList << sel[i]->whatsThis(0); }
+ selList.removeDuplicates();
QString dir = QFileDialog::getExistingDirectory(this, tr("Extract Into Directory"), QDir::homePath() );
if(dir.isEmpty()){ return; }
ui->label_progress->setText(tr("Extracting..."));
- BACKEND->startExtract(dir, true, sel);
+ BACKEND->startExtract(dir, true, selList);
}
void MainUI::ViewFile(QTreeWidgetItem *it){
bgstack15