summaryrefslogtreecommitdiffstats
path: root/src/vsession.cpp
diff options
context:
space:
mode:
authorJan Darmochwal2010-11-04 14:02:39 +0100
committerJan Darmochwal2010-11-04 14:02:39 +0100
commit162121941f6d7bccc4c8f4e98431441e0afe8460 (patch)
tree39affe9504727fc3cbf67ba4b5ecc3a7ea3114e8 /src/vsession.cpp
parentUpdated .de translation (diff)
downloadvmchooser-162121941f6d7bccc4c8f4e98431441e0afe8460.tar.gz
vmchooser-162121941f6d7bccc4c8f4e98431441e0afe8460.tar.xz
vmchooser-162121941f6d7bccc4c8f4e98431441e0afe8460.zip
Config option: pool
* formerly vmchooser_env in vmchooser.conf * pool/vmchooser_env in vmchooser.conf * -P/--pools command line option * a virtual session will only be displayed if a) their pools attribute contains pool b) their pools attribute is unset/empty c) pool is unset/empty * fix for segfault with invalid command line options
Diffstat (limited to 'src/vsession.cpp')
-rw-r--r--src/vsession.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp
index d3c0296..edcd1e8 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -111,6 +111,12 @@ bool VSession::isActive() const {
}
}
+ if (!pool.isEmpty() &&
+ !getAttribute("pools").split("\\s*,\\s*").contains(pool)) {
+ // pools does not contain pool
+ return false;
+ }
+
return true;
}
@@ -182,7 +188,8 @@ void VSession::addUserAndHostname() {
QString image(this->getAttribute("image_name"));
if (QFileInfo(image).isRelative()) {
// make path to image absolute
- this->addNodeWithAttribute("image_name", this->baseDirPath_ + "/" + image);
+ this->addNodeWithAttribute("image_name",
+ this->baseDirPath_ + "/" + image);
}
// insert computername as the first child of <eintrag>