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

[or-cvs] r13316: Patch to add ProxyExecutableArguments option to Vidalia (torbrowser/trunk/src/current-patches)



Author: sjm217
Date: 2008-01-27 13:42:02 -0500 (Sun, 27 Jan 2008)
New Revision: 13316

Added:
   torbrowser/trunk/src/current-patches/vidalia-startproxyarguments.patch
Log:
Patch to add ProxyExecutableArguments option to Vidalia

Added: torbrowser/trunk/src/current-patches/vidalia-startproxyarguments.patch
===================================================================
--- torbrowser/trunk/src/current-patches/vidalia-startproxyarguments.patch	                        (rev 0)
+++ torbrowser/trunk/src/current-patches/vidalia-startproxyarguments.patch	2008-01-27 18:42:02 UTC (rev 13316)
@@ -0,0 +1,69 @@
+Index: src/vidalia/config/vidaliasettings.cpp
+===================================================================
+--- src/vidalia/config/vidaliasettings.cpp	(revision 2326)
++++ src/vidalia/config/vidaliasettings.cpp	(working copy)
+@@ -44,6 +44,7 @@
+ #define SETTING_SHOW_MAINWINDOW_AT_START  "ShowMainWindowAtStart"
+ #define SETTING_BROWSER_EXECUTABLE  "BrowserExecutable"
+ #define SETTING_PROXY_EXECUTABLE  "ProxyExecutable"
++#define SETTING_PROXY_EXECUTABLE_ARGUMENTS  "ProxyExecutableArguments"
+ 
+ #if defined(Q_OS_WIN32)
+ #define STARTUP_REG_KEY        "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
+@@ -76,6 +77,7 @@
+   setDefault(SETTING_SHOW_MAINWINDOW_AT_START, true);
+   setDefault(SETTING_BROWSER_EXECUTABLE, "");
+   setDefault(SETTING_PROXY_EXECUTABLE, "");
++  setDefault(SETTING_PROXY_EXECUTABLE_ARGUMENTS, QStringList());
+ }
+ 
+ /** Gets the currently preferred language code for Vidalia. */
+@@ -203,3 +205,17 @@
+ {
+   setValue(SETTING_PROXY_EXECUTABLE, proxyExecutable);
+ }
++
++/** Returns a list containing additional command line arguments to be passed to ProxyExecutable */
++QStringList
++VidaliaSettings::getProxyExecutableArguments() const
++{
++  return value(SETTING_PROXY_EXECUTABLE_ARGUMENTS).toStringList();
++}
++
++/** Sets the additional arguments to be passed to Proxy Executable */
++void
++VidaliaSettings::setProxyExecutableArguments(const QStringList &proxyExecutableArguments)
++{
++  setValue(SETTING_PROXY_EXECUTABLE_ARGUMENTS, proxyExecutableArguments);
++}
+Index: src/vidalia/config/vidaliasettings.h
+===================================================================
+--- src/vidalia/config/vidaliasettings.h	(revision 2326)
++++ src/vidalia/config/vidaliasettings.h	(working copy)
+@@ -86,7 +86,12 @@
+   /** 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);
++
++  /** 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);
+ };
+ 
+ #endif
+-
+Index: src/vidalia/mainwindow.cpp
+===================================================================
+--- src/vidalia/mainwindow.cpp	(revision 2326)
++++ src/vidalia/mainwindow.cpp	(working copy)
+@@ -459,7 +459,7 @@
+   QString executable = settings.getProxyExecutable();
+   
+   if (!executable.isEmpty())
+-    _proxyProcess->start(executable, QStringList());
++    _proxyProcess->start(executable, settings.getProxyExecutableArguments());
+ }
+ 
+ /** Called when the proxy server fails to start, for example, because