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

[tor-commits] [vidalia/master] Do not reopen firefox if it is not needed



commit 9daeccd8077989e1403fe64c9e0e653eb2a365e8
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date:   Sat Dec 24 14:01:31 2011 -0300

    Do not reopen firefox if it is not needed
---
 src/vidalia/MainWindow.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
index bbd86d2..c9cb8a8 100644
--- a/src/vidalia/MainWindow.cpp
+++ b/src/vidalia/MainWindow.cpp
@@ -647,7 +647,8 @@ MainWindow::launchBrowserFromDirectory()
   commandLine << profileDir;
 
   /* Launch the browser */
-  _browserProcess->start(browserExecutable, commandLine);
+  if(!_browserProcess->state() != QProcess::NotRunning)
+    _browserProcess->start(browserExecutable, commandLine);
   _browserProcess->toForeground();
 }
 
@@ -665,7 +666,8 @@ MainWindow::startSubprocesses()
   } else if (!(subprocess = settings.getBrowserExecutable()).isEmpty()) {
     /* BrowserDirectory is not set, but BrowserExecutable is; use this */
     _browserProcess->setEnvironment(updateBrowserEnv());
-    _browserProcess->start(subprocess, QStringList());
+    if(!_browserProcess->state() != QProcess::NotRunning)
+      _browserProcess->start(subprocess, QStringList());
     _browserProcess->toForeground();
   }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits