Add only actually installed WMs to the list
svn path=/trunk/KDE/kdebase/workspace/; revision=717837
This commit is contained in:
parent
4c7ac1fd5b
commit
57bd7c937e
1 changed files with 5 additions and 1 deletions
4
main.cpp
4
main.cpp
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue