From 6da16aa23538d7d35ec0f0cf24465474537d74fa Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Thu, 12 May 2011 18:52:30 +0200 Subject: make --pvs option configurable via vmchooser.conf --- src/globals.cpp | 1 + src/globals.h | 1 + src/main.cpp | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-55-g7522