diff options
author | Jan Darmochwal | 2010-11-04 14:02:39 +0100 |
---|---|---|
committer | Jan Darmochwal | 2010-11-04 14:02:39 +0100 |
commit | 162121941f6d7bccc4c8f4e98431441e0afe8460 (patch) | |
tree | 39affe9504727fc3cbf67ba4b5ecc3a7ea3114e8 /src/main.cpp | |
parent | Updated .de translation (diff) | |
download | vmchooser-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/main.cpp')
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index fbb3f67..faef051 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,6 +33,7 @@ int main(int argc, char *argv[]) { "Console", "Usage: vmchooser [ OPTIONS | FILE ]\n\n" " -d, --default name of default session\n" + " -P, --pool name of the environment\n" " -p, --path path to vmware .xml files\n" " -x, --xpath path of X Session .desktop files\n" " -s, --size window size <width>x<height>\n" @@ -149,6 +150,14 @@ int main(int argc, char *argv[]) { height = VMCHOOSER_DEFAULT_HEIGHT; } + if (cmdOptions.contains("pool")) { + pool = cmdOptions.value("pool"); + } else if (settings.contains("pool")) { + pool = settings.value("pool").toString(); + } else if (settings.contains("vmchooser_env")) { + pool = settings.value("vmchooser_env").toString(); + } + /* read session files */ QList<Session*> xsessions(XSession::readSessions(xSessionPath)); QList<Session*> vsessions(VSession::readXmlDir(vSessionPath)); |