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

chiiph at torproject.org chiiph at torproject.org
Sat Dec 24 17:05:23 UTC 2011


commit 9daeccd8077989e1403fe64c9e0e653eb2a365e8
Author: Tomás Touceda <chiiph at torproject.org>
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();
   }
 





More information about the tor-commits mailing list