diff options
author | Sebastian Schmelzer | 2011-05-12 18:52:30 +0200 |
---|---|---|
committer | Sebastian Schmelzer | 2011-05-12 18:52:30 +0200 |
commit | 6da16aa23538d7d35ec0f0cf24465474537d74fa (patch) | |
tree | 474db93bbd0a89c0f9428bd6235508f917f2eb26 /src | |
parent | switch default theme to openslx (diff) | |
download | vmchooser-6da16aa23538d7d35ec0f0cf24465474537d74fa.tar.gz vmchooser-6da16aa23538d7d35ec0f0cf24465474537d74fa.tar.xz vmchooser-6da16aa23538d7d35ec0f0cf24465474537d74fa.zip |
make --pvs option configurable via vmchooser.conf
Diffstat (limited to 'src')
-rw-r--r-- | src/globals.cpp | 1 | ||||
-rw-r--r-- | src/globals.h | 1 | ||||
-rw-r--r-- | src/main.cpp | 9 |
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); |