From 1f568882de3997b5567d6c5255c13f8cd909f74a Mon Sep 17 00:00:00 2001 From: q5sys Date: Fri, 17 Nov 2017 11:30:06 -0500 Subject: re-implement zip/iso autoextraction in lumina-fm --- src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp index 66c4c237..b778b49c 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -577,7 +577,14 @@ void DirWidget::UpdateContextMenu(){ } if(LUtils::isValidBinary("lumina-archiver") && sel.length() >=1 && canmodify){ cArchiveMenu->clear(); - if(sel.length()==1 && XDGMime::fromFileName(sel[0]).endsWith("-tar") ){ + if(sel.length()==1 && ( XDGMime::fromFileName(sel[0]).endsWith("-tar") || + XDGMime::fromFileName(sel[0]).endsWith("-image") || + ( XDGMime::fromFileName(sel[0]).contains("zip") && + !XDGMime::fromFileName(sel[0]).endsWith("epub+zip") && + !XDGMime::fromFileName(sel[0]).endsWith("vnd.comicbook+zip" ) + ) + ) + ){ cArchiveMenu->addAction(LXDG::findIcon("archive",""), tr("Extract Here"), this, SLOT(autoExtractFiles()), kExtract->key() ); }else{ cArchiveMenu->addAction(LXDG::findIcon("archive",""), tr("Archive Selection"), this, SLOT(autoArchiveFiles()), kArchive->key() ); -- cgit