aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/desktop-plugins
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-04-22 11:40:54 -0400
committerKen Moore <ken@pcbsd.org>2015-04-22 11:40:54 -0400
commit31b750eafe7a63454cba925e1d00f1c21b0c3e79 (patch)
tree314b371bdc15406efadf817d48e3565a80771183 /lumina-desktop/desktop-plugins
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-31b750eafe7a63454cba925e1d00f1c21b0c3e79.tar.gz
lumina-31b750eafe7a63454cba925e1d00f1c21b0c3e79.tar.bz2
lumina-31b750eafe7a63454cba925e1d00f1c21b0c3e79.zip
Make sure that lumina-fileinfo is only run on *.desktop files from the desktopview plugin (does not support other types of files yet).
Diffstat (limited to 'lumina-desktop/desktop-plugins')
-rw-r--r--lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
index f8e85cea..be815587 100644
--- a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp
@@ -38,7 +38,9 @@ DesktopViewPlugin::DesktopViewPlugin(QWidget* parent, QString ID) : LDPlugin(par
menu->addSeparator();
menu->addAction( LXDG::findIcon("edit-delete",""), tr("Delete"), this, SLOT(deleteItems()) );
menu->addSeparator();
- menu->addAction( LXDG::findIcon("system-search",""), tr("Properties"), this, SLOT(displayProperties()) );
+ if(LUtils::isValidBinary("lumina-fileinfo")){
+ menu->addAction( LXDG::findIcon("system-search",""), tr("Properties"), this, SLOT(displayProperties()) );
+ }
this->layout()->addWidget(list);
this->setInitialSize(600,600);
watcher = new QFileSystemWatcher(this);
@@ -172,6 +174,9 @@ void DesktopViewPlugin::updateContents(){
void DesktopViewPlugin::displayProperties(){
QList<QListWidgetItem*> sel = list->selectedItems();
for(int i=0; i<sel.length(); i++){
- LSession::LaunchApplication("lumina-fileinfo \""+sel[i]->whatsThis());
+ //lumina-fileinfo only works on *.desktop files at the moment
+ if(sel[i]->whatsThis().endsWith(".desktop")){
+ LSession::LaunchApplication("lumina-fileinfo \""+sel[i]->whatsThis());
+ }
}
}
bgstack15