From 57bd7c937ef25aaccc4b2bc208ea9b16263eace9 Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Thu, 27 Sep 2007 17:06:10 +0000 Subject: [PATCH] Add only actually installed WMs to the list svn path=/trunk/KDE/kdebase/workspace/; revision=717837 --- main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 2e18ffe3f5..760d44ef8e 100644 --- a/main.cpp +++ b/main.cpp @@ -29,6 +29,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include +#include #include #include #include @@ -122,7 +123,10 @@ class AlternativeWMDialog : public KDialog void addWM( const QString& wm ) { // TODO: check if wm is installed - wmList->addItem( wm ); + if( !KStandardDirs::findExe( wm ).isEmpty() ) + { + wmList->addItem( wm ); + } } QString selectedWM() const { return wmList->currentText(); }