From 5f450cd48bae1a3c833b93089152f6b308d43c24 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Fri, 4 Mar 2011 18:14:37 +0100 Subject: * 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 --- src/xsession.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/xsession.cpp') 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"; } -- cgit v1.2.3-55-g7522