Changeset 2328

Show
Ignore:
Timestamp:
01/27/08 13:59:29 (10 months ago)
Author:
edmanm
Message:

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/>.

Location:
vidalia/trunk/src/vidalia
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • vidalia/trunk/src/vidalia/config/vidaliasettings.cpp

    r2324 r2328  
    4545#define SETTING_BROWSER_EXECUTABLE  "BrowserExecutable" 
    4646#define SETTING_PROXY_EXECUTABLE  "ProxyExecutable" 
     47#define SETTING_PROXY_EXECUTABLE_ARGUMENTS  "ProxyExecutableArguments" 
    4748 
    4849#if defined(Q_OS_WIN32) 
     
    7778  setDefault(SETTING_BROWSER_EXECUTABLE, ""); 
    7879  setDefault(SETTING_PROXY_EXECUTABLE, ""); 
     80  setDefault(SETTING_PROXY_EXECUTABLE_ARGUMENTS, QStringList()); 
    7981} 
    8082 
     
    197199} 
    198200 
    199 /** Sets the location and name of the proxy server executable to the given string. 
    200  * If set to the empty string, the proxy will not be started. */ 
     201/** Sets the location and name of the proxy server executable to the given 
     202 * string. If set to the empty string, the proxy will not be started. */ 
    201203void 
    202204VidaliaSettings::setProxyExecutable(const QString &proxyExecutable) 
     
    204206  setValue(SETTING_PROXY_EXECUTABLE, proxyExecutable); 
    205207} 
     208 
     209/** Returns a list containing additional command line arguments to be passed 
     210 * to ProxyExecutable */ 
     211QStringList 
     212VidaliaSettings::getProxyExecutableArguments() const 
     213{ 
     214  return value(SETTING_PROXY_EXECUTABLE_ARGUMENTS).toStringList(); 
     215} 
     216 
     217/** Sets the additional arguments to be passed to Proxy Executable */ 
     218void 
     219VidaliaSettings::setProxyExecutableArguments(const QStringList 
     220                                             &proxyExecutableArguments) 
     221{ 
     222  setValue(SETTING_PROXY_EXECUTABLE_ARGUMENTS, proxyExecutableArguments); 
     223} 
     224 
  • vidalia/trunk/src/vidalia/config/vidaliasettings.h

    r2324 r2328  
    7676   * executable name. */ 
    7777  QString getBrowserExecutable() const; 
    78   /** Sets the location and name of the web browser executable to the given string. 
    79    * If set to the empty string, the browser will not be started. */ 
     78  /** Sets the location and name of the web browser executable to the given 
     79   * string. If set to the empty string, the browser will not be started. */ 
    8080  void setBrowserExecutable(const QString &browserExecutable); 
    8181 
     
    8484  QString getProxyExecutable() const; 
    8585 
    86   /** Sets the location and name of the proxy server executable to the given string. 
    87    * If set to the empty string, the proxy will not be started. */ 
     86  /** Sets the location and name of the proxy server executable to the given 
     87   * string. If set to the empty string, the proxy will not be started. */ 
    8888  void setProxyExecutable(const QString &proxyExecutable); 
     89 
     90  /** Returns a list containing additional command line arguments to be 
     91   * passed to ProxyExecutable */ 
     92  QStringList getProxyExecutableArguments() const; 
     93 
     94  /** Sets the additional arguments to be passed to Proxy Executable */ 
     95  void setProxyExecutableArguments(const QStringList &proxyExecutableArguments); 
    8996}; 
    9097 
  • vidalia/trunk/src/vidalia/mainwindow.cpp

    r2324 r2328  
    460460   
    461461  if (!executable.isEmpty()) 
    462     _proxyProcess->start(executable, QStringList()); 
     462    _proxyProcess->start(executable, settings.getProxyExecutableArguments()); 
    463463} 
    464464