diff options
-rw-r--r-- | lumina-fm/MainUI.cpp | 14 | ||||
-rw-r--r-- | lumina-fm/MainUI.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lumina-fm/MainUI.cpp b/lumina-fm/MainUI.cpp index 0c38ae34..d7e3b290 100644 --- a/lumina-fm/MainUI.cpp +++ b/lumina-fm/MainUI.cpp @@ -970,6 +970,10 @@ void MainUI::OpenContextMenu(const QPoint &pt){ contextMenu->addAction(LXDG::findIcon("edit-paste",""), tr("Paste"), this, SLOT(PasteItems()) )->setEnabled(QApplication::clipboard()->mimeData()->hasFormat("x-special/lumina-copied-files") && isUserWritable); contextMenu->addSeparator(); contextMenu->addAction(LXDG::findIcon("edit-delete",""), tr("Delete Selection"), this, SLOT(RemoveItem()) )->setEnabled(info.isWritable()&&hasSelection); + if(LUtils::isValidBinary("lumina-fileinfo")){ + contextMenu->addSeparator(); + contextMenu->addAction(LXDG::findIcon("system-search",""), tr("File Properties"), this, SLOT(ViewPropertiesItem()) )->setEnabled(hasSelection && info.fileName().endsWith(".desktop")); + } //Now show the menu if(radio_view_details->isChecked()){ contextMenu->popup(ui->tree_dir_view->mapToGlobal(pt)); @@ -1412,6 +1416,16 @@ void MainUI::FavoriteItem(){ ItemSelectionChanged(); } +void MainUI::ViewPropertiesItem(){ + if(CItem.isEmpty()){ + QFileInfoList sel = getSelectedItems(); + if(sel.isEmpty()){ return; } + else{ CItem = sel[0].absoluteFilePath(); } + } + QString file = CItem; + QProcess::startDetached("lumina-fileinfo \""+file+"\""); +} + void MainUI::CutItems(){ //Only let this run if viewing the browser page if(ui->stackedWidget->currentWidget()!=ui->page_browser){ return; } diff --git a/lumina-fm/MainUI.h b/lumina-fm/MainUI.h index 58f03ee8..4e6fdf6b 100644 --- a/lumina-fm/MainUI.h +++ b/lumina-fm/MainUI.h @@ -214,6 +214,7 @@ private slots: void RemoveItem(); //Remove the item permanently void RenameItem(); void FavoriteItem(); + void ViewPropertiesItem(); // - full selection actions void CutItems(); void CopyItems(); |