aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-fm
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-11-20 14:17:39 -0500
committerKen Moore <ken@ixsystems.com>2017-11-20 14:17:39 -0500
commit4b5d87c3e3c8ee2f111a7a4b4614c0f8d581fde8 (patch)
treeb63065958770933447081af40f4bded758b96344 /src-qt5/desktop-utils/lumina-fm
parentCleanup some of the suspend-checking for FreeBSD. (diff)
downloadlumina-4b5d87c3e3c8ee2f111a7a4b4614c0f8d581fde8.tar.gz
lumina-4b5d87c3e3c8ee2f111a7a4b4614c0f8d581fde8.tar.bz2
lumina-4b5d87c3e3c8ee2f111a7a4b4614c0f8d581fde8.zip
Make the new "set as wallpaper" menu option enabled/disabled instead of visible/invisible
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fm')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
index 46286ef3..453e9e61 100644
--- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp
@@ -558,11 +558,13 @@ void DirWidget::UpdateContextMenu(){
//contextMenu->addAction(LXDG::findIcon("system-run-with",""), tr("Open With..."), this, SLOT(runWithFiles()) );
contextMenu->addMenu(cOpenWithMenu);
bool ok = (QString(getenv("XDG_CURRENT_DESKTOP"))=="Lumina");
- static QStringList imageformats = LUtils::imageExtensions();
- for(int i=0; i<sel.length() && ok; i++){
- ok = imageformats.contains(sel[i].section(".",-1));
+ if(ok){
+ static QStringList imageformats = LUtils::imageExtensions();
+ for(int i=0; i<sel.length() && ok; i++){
+ ok = imageformats.contains(sel[i].section(".",-1));
+ }
+ contextMenu->addAction(LXDG::findIcon("preferences-desktop-wallpaper","preferences-desktop"), tr("Set as Wallpaper"), this, SLOT(setAsWallpaper()) )->setEnabled(ok);
}
- if(ok){ contextMenu->addAction(LXDG::findIcon("preferences-desktop-wallpaper","preferences-desktop"), tr("Set as Wallpaper"), this, SLOT(setAsWallpaper()) ); }
}
contextMenu->addSection(LXDG::findIcon("unknown",""), tr("File Operations"));
// contextMenu->addMenu(cFModMenu);
bgstack15