diff options
author | Sebastian Schmelzer | 2011-03-04 18:14:37 +0100 |
---|---|---|
committer | Sebastian Schmelzer | 2011-03-04 18:14:37 +0100 |
commit | 5f450cd48bae1a3c833b93089152f6b308d43c24 (patch) | |
tree | d74ab79170e6b219f64bfb5ac0f9da6e76a4a078 /src/xsession.cpp | |
parent | Merge branch 'master' of openslx.org:openslx/tools/vmchooser (diff) | |
download | vmchooser-5f450cd48bae1a3c833b93089152f6b308d43c24.tar.gz vmchooser-5f450cd48bae1a3c833b93089152f6b308d43c24.tar.xz vmchooser-5f450cd48bae1a3c833b93089152f6b308d43c24.zip |
* add debug mode
* implement isValid() for vsessions (checks vmdk/vbox existence)
* make use of isValid() and isActive() when filling the session list
* add icons for vbox, lxde, unknown images, failsafe/term
* use exec to guess xsession icon instead of desciption
* FIX: remove newlines/whitespaces from xmlfilter.sh output
Diffstat (limited to 'src/xsession.cpp')
-rw-r--r-- | src/xsession.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/xsession.cpp b/src/xsession.cpp index 8c32df5..f4cc3d9 100644 --- a/src/xsession.cpp +++ b/src/xsession.cpp @@ -74,6 +74,10 @@ bool XSession::isActive() const { return true; } +bool XSession::isValid() const { + return true; +} + bool XSession::isLocked() const { return false; } @@ -86,12 +90,16 @@ QString XSession::icon() const { QString icon(this->icon_); if (icon.isEmpty()) { - if (this->name_.contains("kde", Qt::CaseInsensitive)) { + if (this->exec_.contains("kde", Qt::CaseInsensitive)) { icon = "kde"; - } else if (this->name_.contains("gnome", Qt::CaseInsensitive)) { + } else if (this->exec_.contains("gnome", Qt::CaseInsensitive)) { icon = "gnome"; - } else if (this->name_.contains("xfce", Qt::CaseInsensitive)) { + } else if (this->exec_.contains("term", Qt::CaseInsensitive)) { + icon = "term"; + } else if (this->exec_.contains("xfce", Qt::CaseInsensitive)) { icon = "xfce"; + } else if (this->exec_.contains("lxde", Qt::CaseInsensitive)) { + icon = "lxde"; } else { icon = "linux"; } |