[tor-commits] [vidalia/master] Add a SkipVersionCheck config option for Tails
chiiph at torproject.org
chiiph at torproject.org
Mon Jan 23 16:45:21 UTC 2012
commit c21a76e6745312566c6a2775cfff0c8b728c024e
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 a60509f..c9dbd60 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -1655,6 +1655,9 @@ MainWindow::circuitEstablished()
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 6cf3238..7273f10 100644
--- a/src/vidalia/config/VidaliaSettings.cpp
+++ b/src/vidalia/config/VidaliaSettings.cpp
@@ -39,6 +39,7 @@
#define SETTING_LAST_UPDATE_CHECK "LastUpdateCheck"
#define SETTING_USE_LOCAL_GEOIP_DATABASE "UseLocalGeoIpDatabase"
#define SETTING_LOCAL_GEOIP_DATABASE "LocalGeoIpDatabase"
+#define SETTING_SKIP_VERSION_CHECK "SkipVersionCheck"
#if defined(Q_OS_WIN32)
#define STARTUP_REG_KEY "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
@@ -84,6 +85,7 @@ VidaliaSettings::VidaliaSettings()
setDefault(SETTING_USE_LOCAL_GEOIP_DATABASE, false);
setDefault(SETTING_LOCAL_GEOIP_DATABASE, "");
setDefault(SETTING_ICON_PREF, Both);
+ setDefault(SETTING_SKIP_VERSION_CHECK, false);
}
/** Gets the currently preferred language code for Vidalia. */
@@ -355,3 +357,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 6cbdefb..b378d9b 100644
--- a/src/vidalia/config/VidaliaSettings.h
+++ b/src/vidalia/config/VidaliaSettings.h
@@ -139,6 +139,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