Add only actually installed WMs to the list

svn path=/trunk/KDE/kdebase/workspace/; revision=717837
This commit is contained in:
Rivo Laks 2007-09-27 17:06:10 +00:00
parent 4c7ac1fd5b
commit 57bd7c937e

View file

@ -29,6 +29,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <QtDBus/QtDBus> #include <QtDBus/QtDBus>
#include <kdialog.h> #include <kdialog.h>
#include <kstandarddirs.h>
#include <QLabel> #include <QLabel>
#include <QComboBox> #include <QComboBox>
#include <QVBoxLayout> #include <QVBoxLayout>
@ -122,8 +123,11 @@ class AlternativeWMDialog : public KDialog
void addWM( const QString& wm ) void addWM( const QString& wm )
{ {
// TODO: check if wm is installed // TODO: check if wm is installed
if( !KStandardDirs::findExe( wm ).isEmpty() )
{
wmList->addItem( wm ); wmList->addItem( wm );
} }
}
QString selectedWM() const { return wmList->currentText(); } QString selectedWM() const { return wmList->currentText(); }
private: private: