Add only actually installed WMs to the list

svn path=/trunk/KDE/kdebase/workspace/; revision=717837
icc-effect-5.14.5
Rivo Laks 2007-09-27 17:06:10 +00:00
parent 4c7ac1fd5b
commit 57bd7c937e
1 changed files with 5 additions and 1 deletions

View File

@ -29,6 +29,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <QtDBus/QtDBus>
#include <kdialog.h>
#include <kstandarddirs.h>
#include <QLabel>
#include <QComboBox>
#include <QVBoxLayout>
@ -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(); }