aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm/widgets')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp12
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h3
2 files changed, 13 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
index 3790d145..c102a32e 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
@@ -241,6 +241,7 @@ void DirWidget::createShortcuts(){
kPaste= new QShortcut(QKeySequence(QKeySequence::Paste),this);
kRename= new QShortcut(QKeySequence(Qt::Key_F2),this);
kExtract= new QShortcut(QKeySequence(Qt::CTRL+Qt::Key_E), this);
+ //kArchive= new QShortcut(QKeySequence(Qt::CTRL+Qt::Key_R), this);
kFav= new QShortcut(QKeySequence(Qt::Key_F3),this);
kDel= new QShortcut(QKeySequence(QKeySequence::Delete),this);
kOpSS= new QShortcut(QKeySequence(Qt::Key_F6),this);
@@ -257,6 +258,7 @@ void DirWidget::createShortcuts(){
connect(kPaste, SIGNAL(activated()), this, SLOT(pasteFiles()) );
connect(kRename, SIGNAL(activated()), this, SLOT(renameFiles()) );
connect(kExtract, SIGNAL(activated()), this, SLOT(autoExtractFiles()) );
+ //connect(kArchive, SIGNAL(activated()), this, SLOT(autoArchiveFiles()) );
connect(kFav, SIGNAL(activated()), this, SLOT(favoriteFiles()) );
connect(kDel, SIGNAL(activated()), this, SLOT(removeFiles()) );
connect(kOpSS, SIGNAL(activated()), this, SLOT(openInSlideshow()) );
@@ -552,7 +554,9 @@ void DirWidget::UpdateContextMenu(){
contextMenu->addAction(LXDG::findIcon("edit-cut",""), tr("Cut Selection"), this, SLOT(cutFiles()), kCut->key() )->setEnabled(canmodify);
contextMenu->addAction(LXDG::findIcon("edit-copy",""), tr("Copy Selection"), this, SLOT(copyFiles()), kCopy->key() )->setEnabled(canmodify);
if(LUtils::isValidBinary("lumina-archiver") && sel.length() ==1){ contextMenu->addAction(LXDG::findIcon("archive",""), tr("Auto-Extract"), this, SLOT(autoExtractFiles()), kExtract->key() )->setEnabled(canmodify); }
- }
+ //if(LUtils::isValidBinary("lumina-archiver") && sel.length() ==1){ contextMenu->addAction(LXDG::findIcon("archive",""), tr("Auto-Archive"), this, SLOT(autoArchiveFiles()), kArchive->key() )->setEnabled(canmodify); }
+
+ }
if( QApplication::clipboard()->mimeData()->hasFormat("x-special/lumina-copied-files") ){
contextMenu->addAction(LXDG::findIcon("edit-paste",""), tr("Paste"), this, SLOT(pasteFiles()), QKeySequence(Qt::CTRL+Qt::Key_V) )->setEnabled(canmodify);
}
@@ -890,6 +894,12 @@ void DirWidget::autoExtractFiles(){
pExtract->start(runline);*/
}
+void DirWidget::autoArchiveFiles(){
+ QStringList files = currentBrowser()->currentSelection();
+ qDebug() << "Starting auto-archival:" << files;
+ ExternalProcess::launch("lumina-archiver", QStringList() << "--aa" << files);
+}
+
//====================
// PROTECTED
//====================
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
index e1dafaa8..bff8cb74 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h
@@ -86,7 +86,7 @@ private:
//The keyboard shortcuts for context menu items
QShortcut *kZoomIn, *kZoomOut, *kNewFile, *kNewDir, *kNewXDG, *kCut, *kCopy, *kPaste, *kRename, \
- *kFav, *kDel, *kOpSS, *kOpMM, *kOpTerm, *kExtract;
+ *kFav, *kDel, *kOpSS, *kOpMM, *kOpTerm, *kExtract; //, *kArchive;
//Functions for internal use
void createShortcuts(); //on init only
@@ -158,6 +158,7 @@ private slots:
void runWithFiles();
//void attachToNewEmail();
void autoExtractFiles();
+ //void autoArchiveFiles();
// - Context-specific operations
void openInSlideshow();
bgstack15