[or-cvs] r14948: Patch to Vidalia which starts up IM client Update TBB vidali (in torbrowser/branches/pidgin: build-scripts/config src/current-patches)

sjm217 at seul.org sjm217 at seul.org
Wed Jun 4 18:38:36 UTC 2008


Author: sjm217
Date: 2008-06-04 14:38:35 -0400 (Wed, 04 Jun 2008)
New Revision: 14948

Modified:
   torbrowser/branches/pidgin/build-scripts/config/vidalia.conf
   torbrowser/branches/pidgin/src/current-patches/vidalia-startim.patch
Log:
Patch to Vidalia which starts up IM client
Update TBB vidalia.conf to start Pidgin

Modified: torbrowser/branches/pidgin/build-scripts/config/vidalia.conf
===================================================================
--- torbrowser/branches/pidgin/build-scripts/config/vidalia.conf	2008-06-04 12:51:00 UTC (rev 14947)
+++ torbrowser/branches/pidgin/build-scripts/config/vidalia.conf	2008-06-04 18:38:35 UTC (rev 14948)
@@ -1,5 +1,6 @@
 [General]
 BrowserExecutable=FirefoxPortable\\FirefoxPortable.exe
+IMExecutable=PidginPortable\\PidginPortable.exe
 LanguageCode=en
 ProxyExecutable=App\\polipo.exe
 ProxyExecutableArguments=-c, Data\\Polipo\\polipo.conf

Modified: torbrowser/branches/pidgin/src/current-patches/vidalia-startim.patch
===================================================================
--- torbrowser/branches/pidgin/src/current-patches/vidalia-startim.patch	2008-06-04 12:51:00 UTC (rev 14947)
+++ torbrowser/branches/pidgin/src/current-patches/vidalia-startim.patch	2008-06-04 18:38:35 UTC (rev 14948)
@@ -1,6 +1,6 @@
 Index: src/vidalia/config/vidaliasettings.cpp
 ===================================================================
---- src/vidalia/config/vidaliasettings.cpp	(revision 2643)
+--- src/vidalia/config/vidaliasettings.cpp	(revision 2665)
 +++ src/vidalia/config/vidaliasettings.cpp	(working copy)
 @@ -32,6 +32,7 @@
  #define SETTING_DATA_DIRECTORY      "DataDirectory"
@@ -31,7 +31,7 @@
 +}
 +
 +/** Sets the location and name of the IM client executable to the given string.
-+ * If set to the empty string, the browser will not be started. */
++ * If set to the empty string, the client will not be started. */
 +void
 +VidaliaSettings::setIMExecutable(const QString &IMExecutable)
 +{
@@ -43,7 +43,7 @@
  bool
 Index: src/vidalia/config/vidaliasettings.h
 ===================================================================
---- src/vidalia/config/vidaliasettings.h	(revision 2643)
+--- src/vidalia/config/vidaliasettings.h	(revision 2665)
 +++ src/vidalia/config/vidaliasettings.h	(working copy)
 @@ -68,6 +68,13 @@
     * string. If set to the empty string, the browser will not be started. */
@@ -59,9 +59,66 @@
    /** Returns true if Vidalia should start a proxy application when it
     * starts. */
    bool runProxyAtStart();
+Index: src/vidalia/helperprocess.cpp
+===================================================================
+--- src/vidalia/helperprocess.cpp	(revision 2665)
++++ src/vidalia/helperprocess.cpp	(working copy)
+@@ -50,6 +50,12 @@
+   // Call error handling routine on errors
+   QObject::connect(this, SIGNAL(error(QProcess::ProcessError)),
+                    this, SLOT(onError(QProcess::ProcessError)));
++  // Call started handler on successful startup
++  QObject::connect(this, SIGNAL(started()),
++                   this, SLOT(onStart()));
++
++  // Mark as not having started
++  _okStart = false;
+ }
+ 
+ /** Start the specified application. */
+@@ -70,4 +76,16 @@
+   }
+ }
+ 
++/** Invoked when underlying QProcess starts. */
++void
++HelperProcess::onStart()
++{
++  _okStart = true;
++}
+ 
++/** Returns true iff process is not running. */
++bool
++HelperProcess::isDone() const
++{
++  return state() == NotRunning;
++}
+Index: src/vidalia/helperprocess.h
+===================================================================
+--- src/vidalia/helperprocess.h	(revision 2665)
++++ src/vidalia/helperprocess.h	(working copy)
+@@ -53,10 +53,18 @@
+   HelperProcess(QObject *parent = 0);
+   /** Start the specified application. */
+   void start(const QString &app, const QStringList &args);
++  /** Returns true iff process is not running. */
++  bool isDone() const;
+ 
++private:
++  /** True iff the underlying QProcess has sucessfully started */
++  bool _okStart;
++
+ private slots:
+   /** Invoked when underlying QProcess fails. */
+   void onError(QProcess::ProcessError error);
++  /** Invoked when underlying QProcess starts. */
++  void onStart();
+ 
+ signals:
+   /** Invoked when start() fails. */
 Index: src/vidalia/mainwindow.cpp
 ===================================================================
---- src/vidalia/mainwindow.cpp	(revision 2643)
+--- src/vidalia/mainwindow.cpp	(revision 2665)
 +++ src/vidalia/mainwindow.cpp	(working copy)
 @@ -128,10 +128,17 @@
    /* Create a new HelperProcess object, used to start the web browser */
@@ -82,8 +139,26 @@
    /* Create a new HelperProcess object, used to start the proxy server */
    _proxyProcess = new HelperProcess(this);
    connect(_proxyProcess, SIGNAL(startFailed(QString)),
-@@ -419,8 +426,8 @@
+@@ -409,26 +416,43 @@
+ #endif
+ }
+ 
+-/** Starts the web browser, if appropriately configured */
+-void MainWindow::startBrowser()
++/** Starts the web browser and IM client, if appropriately configured */
++void MainWindow::startSubprocesses()
+ {
+   VidaliaSettings settings;
+   QString executable = settings.getBrowserExecutable();
+   
+   if (!executable.isEmpty())
      _browserProcess->start(executable, QStringList());
++
++  executable = settings.getIMExecutable();
++
++  if (!executable.isEmpty())
++    _imProcess->start(executable, QStringList());
++  
  }
  
 -/** Called when browser has exited */
@@ -93,8 +168,20 @@
  {
    Q_UNUSED(exitCode)
    Q_UNUSED(exitStatus)
-@@ -428,7 +435,7 @@
-   shutdown();
+ 
+-  shutdown();
++  /* Get path to browser and IM client */
++  VidaliaSettings settings;
++  QString browserExecutable = settings.getBrowserExecutable();
++  QString imExecutable = settings.getIMExecutable();
++
++  /* A subprocess is finished if it successfully exited or was never asked to start */
++  bool browserDone = browserExecutable.isEmpty() || _browserProcess->isDone();
++  bool imDone = imExecutable.isEmpty() || _imProcess->isDone();
++
++  /* Exit if both subprocesses are finished */
++  if (browserDone && imDone)
++    shutdown();
  }
  
 -/** Called when the web browser, for example, because the path
@@ -102,7 +189,7 @@
   * specified to the web browser executable didn't lead to an executable. */
  void
  MainWindow::onBrowserFailed(QString errmsg)
-@@ -441,6 +448,19 @@
+@@ -441,6 +465,19 @@
                VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape);
  }
  
@@ -122,9 +209,18 @@
  /** Starts the proxy server, if appropriately configured */
  void MainWindow::startProxy()
  {
+@@ -1032,7 +1069,7 @@
+ MainWindow::circuitEstablished()
+ {
+   updateTorStatus(CircuitEstablished);
+-  startBrowser();
++  startSubprocesses();
+ }
+ 
+ /** Checks the status of the current version of Tor to see if it's old,
 Index: src/vidalia/mainwindow.h
 ===================================================================
---- src/vidalia/mainwindow.h	(revision 2643)
+--- src/vidalia/mainwindow.h	(revision 2665)
 +++ src/vidalia/mainwindow.h	(working copy)
 @@ -101,10 +101,12 @@
    void showServerConfigDialog();
@@ -141,6 +237,15 @@
    /** Called when the proxy server fails to start */
    void onProxyFailed(QString errmsg);
  
+@@ -137,7 +139,7 @@
+    * previously set TorStatus value. */
+   TorStatus updateTorStatus(TorStatus status);
+   /** Starts the web browser, if appropriately configured */
+-  void startBrowser();
++  void startSubprocesses();
+   /** Starts the proxy server, if appropriately configured */
+   void startProxy();
+   /** Converts a TorStatus enum value to a string for debug logging purposes. */
 @@ -179,6 +181,8 @@
    TorControl* _torControl;
    /** A HelperProcess object that manages the web browser */



More information about the tor-commits mailing list