[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r2482: Add a config value for remembering whether the 'Start a prox (in vidalia/trunk: . src/vidalia/config)



Author: edmanm
Date: 2008-04-05 00:09:14 -0400 (Sat, 05 Apr 2008)
New Revision: 2482

Modified:
   vidalia/trunk/
   vidalia/trunk/src/vidalia/config/vidaliasettings.cpp
   vidalia/trunk/src/vidalia/config/vidaliasettings.h
Log:
 r308@lysithea:  edmanm | 2008-04-04 23:55:32 -0400
 Add a config value for remembering whether the 'Start a proxy application...'
 checkbox is checked.



Property changes on: vidalia/trunk
___________________________________________________________________
 svk:merge ticket from /local/vidalia/trunk [r308] on 90112fd6-a33b-4cea-8d39-48ff1d78625c

Modified: vidalia/trunk/src/vidalia/config/vidaliasettings.cpp
===================================================================
--- vidalia/trunk/src/vidalia/config/vidaliasettings.cpp	2008-04-04 03:01:05 UTC (rev 2481)
+++ vidalia/trunk/src/vidalia/config/vidaliasettings.cpp	2008-04-05 04:09:14 UTC (rev 2482)
@@ -32,7 +32,8 @@
 #define SETTING_DATA_DIRECTORY      "DataDirectory"
 #define SETTING_SHOW_MAINWINDOW_AT_START  "ShowMainWindowAtStart"
 #define SETTING_BROWSER_EXECUTABLE  "BrowserExecutable"
-#define SETTING_PROXY_EXECUTABLE  "ProxyExecutable"
+#define SETTING_RUN_PROXY_AT_START  "RunProxyAtStart"
+#define SETTING_PROXY_EXECUTABLE    "ProxyExecutable"
 #define SETTING_PROXY_EXECUTABLE_ARGUMENTS  "ProxyExecutableArguments"
 
 #if defined(Q_OS_WIN32)
@@ -65,6 +66,7 @@
   setDefault(SETTING_RUN_TOR_AT_START, true);
   setDefault(SETTING_SHOW_MAINWINDOW_AT_START, true);
   setDefault(SETTING_BROWSER_EXECUTABLE, "");
+  setDefault(SETTING_RUN_PROXY_AT_START, false);
   setDefault(SETTING_PROXY_EXECUTABLE, "");
   setDefault(SETTING_PROXY_EXECUTABLE_ARGUMENTS, QStringList());
 }
@@ -179,6 +181,21 @@
   setValue(SETTING_BROWSER_EXECUTABLE, browserExecutable);
 }
 
+/** Returns true if Vidalia should start a proxy application when it
+ * starts. */
+bool
+VidaliaSettings::runProxyAtStart()
+{
+  return value(SETTING_RUN_PROXY_AT_START).toBool();
+}
+
+/** Set whether to run a proxy application when Vidalia starts. */
+void
+VidaliaSettings::setRunProxyAtStart(bool run)
+{
+  setValue(SETTING_RUN_PROXY_AT_START, run);
+}
+
 /** Returns a fully-qualified path to the proxy server, including the
  * executable name. */
 QString

Modified: vidalia/trunk/src/vidalia/config/vidaliasettings.h
===================================================================
--- vidalia/trunk/src/vidalia/config/vidaliasettings.h	2008-04-04 03:01:05 UTC (rev 2481)
+++ vidalia/trunk/src/vidalia/config/vidaliasettings.h	2008-04-05 04:09:14 UTC (rev 2482)
@@ -68,10 +68,15 @@
    * string. If set to the empty string, the browser will not be started. */
   void setBrowserExecutable(const QString &browserExecutable);
 
+  /** Returns true if Vidalia should start a proxy application when it
+   * starts. */
+  bool runProxyAtStart();
+  /** Set whether to run a proxy application when Vidalia starts. */
+  void setRunProxyAtStart(bool run);
+
   /** Returns a fully-qualified path to the proxy server, including the
    * executable name. */
   QString getProxyExecutable() const;
-
   /** Sets the location and name of the proxy server executable to the given
    * string. If set to the empty string, the proxy will not be started. */
   void setProxyExecutable(const QString &proxyExecutable);
@@ -79,7 +84,6 @@
   /** Returns a list containing additional command line arguments to be
    * passed to ProxyExecutable */
   QStringList getProxyExecutableArguments() const;
-
   /** Sets the additional arguments to be passed to Proxy Executable */
   void setProxyExecutableArguments(const QStringList &proxyExecutableArguments);
 };