summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-05-12 18:52:30 +0200
committerSebastian Schmelzer2011-05-12 18:52:30 +0200
commit6da16aa23538d7d35ec0f0cf24465474537d74fa (patch)
tree474db93bbd0a89c0f9428bd6235508f917f2eb26
parentswitch default theme to openslx (diff)
downloadvmchooser-6da16aa23538d7d35ec0f0cf24465474537d74fa.tar.gz
vmchooser-6da16aa23538d7d35ec0f0cf24465474537d74fa.tar.xz
vmchooser-6da16aa23538d7d35ec0f0cf24465474537d74fa.zip
make --pvs option configurable via vmchooser.conf
-rw-r--r--src/globals.cpp1
-rw-r--r--src/globals.h1
-rw-r--r--src/main.cpp9
3 files changed, 10 insertions, 1 deletions
diff --git a/src/globals.cpp b/src/globals.cpp
index b580bbe..31e54d5 100644
--- a/src/globals.cpp
+++ b/src/globals.cpp
@@ -19,6 +19,7 @@ const QString userConfFile(userPath + "/vmchooser.conf");
const QString previousSessionFile(userPath + "/vmchooser_prev_session");
bool debugMode = false;
+bool pvsEnabled = false;
QString pool;
QString theme;
diff --git a/src/globals.h b/src/globals.h
index b36c959..d46db63 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -17,6 +17,7 @@
class QString;
extern bool debugMode;
+extern bool pvsEnabled;
extern QString binPath;
extern QString etcPath;
diff --git a/src/main.cpp b/src/main.cpp
index 1fe6401..f5853be 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -183,7 +183,14 @@ int main(int argc, char *argv[]) {
w.setTheme();
w.setWindowFlags(Qt::FramelessWindowHint);
- if (cmdOptions.contains("pvs"))
+ if (cmdOptions.contains("pvs")) {
+ pvsEnabled = true;
+ } else if (settings.contains("pvs")) {
+ if (settings.value("pvs").toInt() == 1)
+ pvsEnabled = true;
+ }
+
+ if ( pvsEnabled )
w.showSettingsPVS();
w.resize(width, height);