From 4b5d87c3e3c8ee2f111a7a4b4614c0f8d581fde8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 20 Nov 2017 14:17:39 -0500 Subject: Make the new "set as wallpaper" menu option enabled/disabled instead of visible/invisible --- src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp') 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; iaddAction(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); -- cgit