[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2328: Add a 'ProxyExecutableArguments' configuration option to spe (in vidalia/trunk: . src/vidalia src/vidalia/config)
Author: edmanm
Date: 2008-01-27 13:59:29 -0500 (Sun, 27 Jan 2008)
New Revision: 2328
Modified:
vidalia/trunk/
vidalia/trunk/src/vidalia/config/vidaliasettings.cpp
vidalia/trunk/src/vidalia/config/vidaliasettings.h
vidalia/trunk/src/vidalia/mainwindow.cpp
Log:
r89@lysithea: edmanm | 2008-01-27 13:58:58 -0500
Add a 'ProxyExecutableArguments' configuration option to specify command line
arguments to be used when launching ProxyExecutable. Patch from Steven J.
Murdoch <http://www.cl.cam.ac.uk/users/sjm217/>.
Property changes on: vidalia/trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r89] on 90112fd6-a33b-4cea-8d39-48ff1d78625c
Modified: vidalia/trunk/src/vidalia/config/vidaliasettings.cpp
===================================================================
--- vidalia/trunk/src/vidalia/config/vidaliasettings.cpp 2008-01-27 15:51:39 UTC (rev 2327)
+++ vidalia/trunk/src/vidalia/config/vidaliasettings.cpp 2008-01-27 18:59:29 UTC (rev 2328)
@@ -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. */
@@ -196,10 +198,27 @@
return QDir::convertSeparators(value(SETTING_PROXY_EXECUTABLE).toString());
}
-/** 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. */
+/** 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
VidaliaSettings::setProxyExecutable(const QString &proxyExecutable)
{
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);
+}
+
Modified: vidalia/trunk/src/vidalia/config/vidaliasettings.h
===================================================================
--- vidalia/trunk/src/vidalia/config/vidaliasettings.h 2008-01-27 15:51:39 UTC (rev 2327)
+++ vidalia/trunk/src/vidalia/config/vidaliasettings.h 2008-01-27 18:59:29 UTC (rev 2328)
@@ -75,17 +75,24 @@
/** Returns a fully-qualified path to the web browser, including the
* executable name. */
QString getBrowserExecutable() const;
- /** Sets the location and name of the web browser executable to the given string.
- * If set to the empty string, the browser will not be started. */
+ /** Sets the location and name of the web browser executable to the given
+ * string. If set to the empty string, the browser will not be started. */
void setBrowserExecutable(const QString &browserExecutable);
/** 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. */
+ /** 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
Modified: vidalia/trunk/src/vidalia/mainwindow.cpp
===================================================================
--- vidalia/trunk/src/vidalia/mainwindow.cpp 2008-01-27 15:51:39 UTC (rev 2327)
+++ vidalia/trunk/src/vidalia/mainwindow.cpp 2008-01-27 18:59:29 UTC (rev 2328)
@@ -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