[tor-commits] [vidalia/alpha] Add a SkipVersionCheck config option for Tails
chiiph at torproject.org
chiiph at torproject.org
Mon Jan 23 16:45:42 UTC 2012
commit 9f47030305d452d05bc799612ca98456a9017a87
Author: Tomás Touceda <chiiph at torproject.org>
Date: Fri Jan 20 14:57:30 2012 -0300
Add a SkipVersionCheck config option for Tails
---
src/vidalia/MainWindow.cpp | 3 +++
src/vidalia/config/VidaliaSettings.cpp | 8 ++++++++
src/vidalia/config/VidaliaSettings.h | 3 +++
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index 183e78f..7e27bcf 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -1319,6 +1319,9 @@ MainWindow::tryHashed()
void
MainWindow::checkTorVersion()
{
+ VidaliaSettings settings;
+ if(settings.skipVersionCheck())
+ return;
QString status;
if (_torControl->getInfo("status/version/current", status)) {
if (!status.compare("old", Qt::CaseInsensitive)
diff --git a/src/vidalia/config/VidaliaSettings.cpp b/src/vidalia/config/VidaliaSettings.cpp
index 022c427..ac15a63 100644
--- a/src/vidalia/config/VidaliaSettings.cpp
+++ b/src/vidalia/config/VidaliaSettings.cpp
@@ -40,6 +40,7 @@
#define SETTING_USE_LOCAL_GEOIP_DATABASE "UseLocalGeoIpDatabase"
#define SETTING_LOCAL_GEOIP_DATABASE "LocalGeoIpDatabase"
#define SETTING_PLUGIN_PATH "PluginPath"
+#define SETTING_SKIP_VERSION_CHECK "SkipVersionCheck"
#if defined(Q_OS_WIN32)
#define STARTUP_REG_KEY "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
@@ -87,6 +88,7 @@ VidaliaSettings::VidaliaSettings()
setDefault(SETTING_PLUGIN_PATH, vApp->dataDirectory());
setDefault(SETTING_ICON_PREF, Both);
+ setDefault(SETTING_SKIP_VERSION_CHECK, false);
}
/** Gets the currently preferred language code for Vidalia. */
@@ -370,3 +372,9 @@ VidaliaSettings::fromString(QString iconPref)
return Both;
}
+
+bool
+VidaliaSettings::skipVersionCheck() const
+{
+ return value(SETTING_SKIP_VERSION_CHECK).toBool();
+}
diff --git a/src/vidalia/config/VidaliaSettings.h b/src/vidalia/config/VidaliaSettings.h
index bb6f1a0..99dfec9 100644
--- a/src/vidalia/config/VidaliaSettings.h
+++ b/src/vidalia/config/VidaliaSettings.h
@@ -144,6 +144,9 @@ public:
void setIconPref(const IconPosition iconPref);
QString toString(const IconPosition iconPref);
IconPosition fromString(QString iconPref);
+
+ /** Returns true if Vidalia should skip the version check for tor */
+ bool skipVersionCheck() const;
};
#endif
More information about the tor-commits
mailing list