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

[or-cvs] r15048: Starting the IM client is now in Vidalia trunk (in torbrowser/trunk/src: archived-patches current-patches)



Author: sjm217
Date: 2008-06-08 18:44:08 -0400 (Sun, 08 Jun 2008)
New Revision: 15048

Added:
   torbrowser/trunk/src/archived-patches/vidalia-startim.patch
Removed:
   torbrowser/trunk/src/current-patches/vidalia-startim.patch
Log:
Starting the IM client is now in Vidalia trunk

Copied: torbrowser/trunk/src/archived-patches/vidalia-startim.patch (from rev 15041, torbrowser/trunk/src/current-patches/vidalia-startim.patch)
===================================================================
--- torbrowser/trunk/src/archived-patches/vidalia-startim.patch	                        (rev 0)
+++ torbrowser/trunk/src/archived-patches/vidalia-startim.patch	2008-06-08 22:44:08 UTC (rev 15048)
@@ -0,0 +1,257 @@
+Index: src/vidalia/config/vidaliasettings.cpp
+===================================================================
+--- src/vidalia/config/vidaliasettings.cpp	(revision 2665)
++++ src/vidalia/config/vidaliasettings.cpp	(working copy)
+@@ -32,6 +32,7 @@
+ #define SETTING_DATA_DIRECTORY      "DataDirectory"
+ #define SETTING_SHOW_MAINWINDOW_AT_START  "ShowMainWindowAtStart"
+ #define SETTING_BROWSER_EXECUTABLE  "BrowserExecutable"
++#define SETTING_IM_EXECUTABLE       "IMExecutable"
+ #define SETTING_RUN_PROXY_AT_START  "RunProxyAtStart"
+ #define SETTING_PROXY_EXECUTABLE    "ProxyExecutable"
+ #define SETTING_PROXY_EXECUTABLE_ARGUMENTS  "ProxyExecutableArguments"
+@@ -66,6 +67,7 @@
+   setDefault(SETTING_RUN_TOR_AT_START, true);
+   setDefault(SETTING_SHOW_MAINWINDOW_AT_START, true);
+   setDefault(SETTING_BROWSER_EXECUTABLE, "");
++  setDefault(SETTING_IM_EXECUTABLE, "");
+   setDefault(SETTING_RUN_PROXY_AT_START, false);
+   setDefault(SETTING_PROXY_EXECUTABLE, "");
+   setDefault(SETTING_PROXY_EXECUTABLE_ARGUMENTS, QStringList());
+@@ -181,6 +183,22 @@
+   setValue(SETTING_BROWSER_EXECUTABLE, browserExecutable);
+ }
+ 
++/** Returns a fully-qualified path to the IM client, including the
++ * executable name. */
++QString
++VidaliaSettings::getIMExecutable() const
++{
++  return QDir::convertSeparators(value(SETTING_IM_EXECUTABLE).toString());
++}
++
++/** Sets the location and name of the IM client executable to the given string.
++ * If set to the empty string, the client will not be started. */
++void
++VidaliaSettings::setIMExecutable(const QString &IMExecutable)
++{
++  setValue(SETTING_IM_EXECUTABLE, IMExecutable);
++}
++
+ /** Returns true if Vidalia should start a proxy application when it
+  * starts. */
+ bool
+Index: src/vidalia/config/vidaliasettings.h
+===================================================================
+--- 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. */
+   void setBrowserExecutable(const QString &browserExecutable);
+ 
++  /** Returns a fully-qualified path to the IM client, including the
++   * executable name. */
++  QString getIMExecutable() const;
++  /** Sets the location and name of the IM client executable to the given
++   * string. If set to the empty string, the client will not be started. */
++  void setIMExecutable(const QString &IMExecutable);
++
+   /** 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 2665)
++++ src/vidalia/mainwindow.cpp	(working copy)
+@@ -128,10 +128,17 @@
+   /* Create a new HelperProcess object, used to start the web browser */
+   _browserProcess = new HelperProcess(this);
+   connect(_browserProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
+-           this, SLOT(onBrowserFinished(int, QProcess::ExitStatus)));
++           this, SLOT(onSubprocessFinished(int, QProcess::ExitStatus)));
+   connect(_browserProcess, SIGNAL(startFailed(QString)),
+            this, SLOT(onBrowserFailed(QString)));
+ 
++  /* Create a new HelperProcess object, used to start the web browser */
++  _imProcess = new HelperProcess(this);
++  connect(_imProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
++           this, SLOT(onSubprocessFinished(int, QProcess::ExitStatus)));
++  connect(_imProcess, SIGNAL(startFailed(QString)),
++           this, SLOT(onIMFailed(QString)));
++
+   /* Create a new HelperProcess object, used to start the proxy server */
+   _proxyProcess = new HelperProcess(this);
+   connect(_proxyProcess, SIGNAL(startFailed(QString)),
+@@ -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 */
+-void MainWindow::onBrowserFinished(int exitCode, QProcess::ExitStatus exitStatus)
++/** Called when browser or IM client have exited */
++void MainWindow::onSubprocessFinished(int exitCode, QProcess::ExitStatus exitStatus)
+ {
+   Q_UNUSED(exitCode)
+   Q_UNUSED(exitStatus)
+ 
+-  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
++/** Called when the web browser failed to start, for example, because the path
+  * specified to the web browser executable didn't lead to an executable. */
+ void
+ MainWindow::onBrowserFailed(QString errmsg)
+@@ -441,6 +465,19 @@
+               VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape);
+ }
+ 
++/** Called when the IM client failed to start, for example, because the path
++ * specified to the IM client executable didn't lead to an executable. */
++void
++MainWindow::onIMFailed(QString errmsg)
++{
++  Q_UNUSED(errmsg);
++ 
++  /* Display an error message and see if the user wants some help */
++  VMessageBox::warning(this, tr("Error starting IM client"),
++              tr("Vidalia was unable to start the configured IM client"),
++              VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape);
++}
++
+ /** 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 2665)
++++ src/vidalia/mainwindow.h	(working copy)
+@@ -101,10 +101,12 @@
+   void showServerConfigDialog();
+   /** Called when the "show on startup" checkbox is toggled. */
+   void toggleShowOnStartup(bool checked);
+-  /** Called when the web browser has stopped */
+-  void onBrowserFinished(int exitCode, QProcess::ExitStatus exitStatus);
++  /** Called when the web browser or IM client have stopped */
++  void onSubprocessFinished(int exitCode, QProcess::ExitStatus exitStatus);
+   /** Called web the web browser failed to start */
+   void onBrowserFailed(QString errmsg);
++  /** Called web the IM client failed to start */
++  void onIMFailed(QString errmsg);
+   /** 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 */
+   HelperProcess* _browserProcess;
++  /** A HelperProcess object that manages the IM client */
++  HelperProcess* _imProcess;
+   /** A HelperProcess object that manages the proxy server */
+   HelperProcess* _proxyProcess;
+   /** Remembers the control password between when we start Tor with a hash of

Deleted: torbrowser/trunk/src/current-patches/vidalia-startim.patch
===================================================================
--- torbrowser/trunk/src/current-patches/vidalia-startim.patch	2008-06-08 22:41:07 UTC (rev 15047)
+++ torbrowser/trunk/src/current-patches/vidalia-startim.patch	2008-06-08 22:44:08 UTC (rev 15048)
@@ -1,257 +0,0 @@
-Index: src/vidalia/config/vidaliasettings.cpp
-===================================================================
---- src/vidalia/config/vidaliasettings.cpp	(revision 2665)
-+++ src/vidalia/config/vidaliasettings.cpp	(working copy)
-@@ -32,6 +32,7 @@
- #define SETTING_DATA_DIRECTORY      "DataDirectory"
- #define SETTING_SHOW_MAINWINDOW_AT_START  "ShowMainWindowAtStart"
- #define SETTING_BROWSER_EXECUTABLE  "BrowserExecutable"
-+#define SETTING_IM_EXECUTABLE       "IMExecutable"
- #define SETTING_RUN_PROXY_AT_START  "RunProxyAtStart"
- #define SETTING_PROXY_EXECUTABLE    "ProxyExecutable"
- #define SETTING_PROXY_EXECUTABLE_ARGUMENTS  "ProxyExecutableArguments"
-@@ -66,6 +67,7 @@
-   setDefault(SETTING_RUN_TOR_AT_START, true);
-   setDefault(SETTING_SHOW_MAINWINDOW_AT_START, true);
-   setDefault(SETTING_BROWSER_EXECUTABLE, "");
-+  setDefault(SETTING_IM_EXECUTABLE, "");
-   setDefault(SETTING_RUN_PROXY_AT_START, false);
-   setDefault(SETTING_PROXY_EXECUTABLE, "");
-   setDefault(SETTING_PROXY_EXECUTABLE_ARGUMENTS, QStringList());
-@@ -181,6 +183,22 @@
-   setValue(SETTING_BROWSER_EXECUTABLE, browserExecutable);
- }
- 
-+/** Returns a fully-qualified path to the IM client, including the
-+ * executable name. */
-+QString
-+VidaliaSettings::getIMExecutable() const
-+{
-+  return QDir::convertSeparators(value(SETTING_IM_EXECUTABLE).toString());
-+}
-+
-+/** Sets the location and name of the IM client executable to the given string.
-+ * If set to the empty string, the client will not be started. */
-+void
-+VidaliaSettings::setIMExecutable(const QString &IMExecutable)
-+{
-+  setValue(SETTING_IM_EXECUTABLE, IMExecutable);
-+}
-+
- /** Returns true if Vidalia should start a proxy application when it
-  * starts. */
- bool
-Index: src/vidalia/config/vidaliasettings.h
-===================================================================
---- 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. */
-   void setBrowserExecutable(const QString &browserExecutable);
- 
-+  /** Returns a fully-qualified path to the IM client, including the
-+   * executable name. */
-+  QString getIMExecutable() const;
-+  /** Sets the location and name of the IM client executable to the given
-+   * string. If set to the empty string, the client will not be started. */
-+  void setIMExecutable(const QString &IMExecutable);
-+
-   /** 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 2665)
-+++ src/vidalia/mainwindow.cpp	(working copy)
-@@ -128,10 +128,17 @@
-   /* Create a new HelperProcess object, used to start the web browser */
-   _browserProcess = new HelperProcess(this);
-   connect(_browserProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
--           this, SLOT(onBrowserFinished(int, QProcess::ExitStatus)));
-+           this, SLOT(onSubprocessFinished(int, QProcess::ExitStatus)));
-   connect(_browserProcess, SIGNAL(startFailed(QString)),
-            this, SLOT(onBrowserFailed(QString)));
- 
-+  /* Create a new HelperProcess object, used to start the web browser */
-+  _imProcess = new HelperProcess(this);
-+  connect(_imProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
-+           this, SLOT(onSubprocessFinished(int, QProcess::ExitStatus)));
-+  connect(_imProcess, SIGNAL(startFailed(QString)),
-+           this, SLOT(onIMFailed(QString)));
-+
-   /* Create a new HelperProcess object, used to start the proxy server */
-   _proxyProcess = new HelperProcess(this);
-   connect(_proxyProcess, SIGNAL(startFailed(QString)),
-@@ -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 */
--void MainWindow::onBrowserFinished(int exitCode, QProcess::ExitStatus exitStatus)
-+/** Called when browser or IM client have exited */
-+void MainWindow::onSubprocessFinished(int exitCode, QProcess::ExitStatus exitStatus)
- {
-   Q_UNUSED(exitCode)
-   Q_UNUSED(exitStatus)
- 
--  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
-+/** Called when the web browser failed to start, for example, because the path
-  * specified to the web browser executable didn't lead to an executable. */
- void
- MainWindow::onBrowserFailed(QString errmsg)
-@@ -441,6 +465,19 @@
-               VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape);
- }
- 
-+/** Called when the IM client failed to start, for example, because the path
-+ * specified to the IM client executable didn't lead to an executable. */
-+void
-+MainWindow::onIMFailed(QString errmsg)
-+{
-+  Q_UNUSED(errmsg);
-+ 
-+  /* Display an error message and see if the user wants some help */
-+  VMessageBox::warning(this, tr("Error starting IM client"),
-+              tr("Vidalia was unable to start the configured IM client"),
-+              VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape);
-+}
-+
- /** 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 2665)
-+++ src/vidalia/mainwindow.h	(working copy)
-@@ -101,10 +101,12 @@
-   void showServerConfigDialog();
-   /** Called when the "show on startup" checkbox is toggled. */
-   void toggleShowOnStartup(bool checked);
--  /** Called when the web browser has stopped */
--  void onBrowserFinished(int exitCode, QProcess::ExitStatus exitStatus);
-+  /** Called when the web browser or IM client have stopped */
-+  void onSubprocessFinished(int exitCode, QProcess::ExitStatus exitStatus);
-   /** Called web the web browser failed to start */
-   void onBrowserFailed(QString errmsg);
-+  /** Called web the IM client failed to start */
-+  void onIMFailed(QString errmsg);
-   /** 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 */
-   HelperProcess* _browserProcess;
-+  /** A HelperProcess object that manages the IM client */
-+  HelperProcess* _imProcess;
-   /** A HelperProcess object that manages the proxy server */
-   HelperProcess* _proxyProcess;
-   /** Remembers the control password between when we start Tor with a hash of