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

[vidalia-svn] r1821: Fix a crash I introduced in r1805 that would occur if you tr (trunk/src/gui)



Author: edmanm
Date: 2007-08-02 02:39:49 -0400 (Thu, 02 Aug 2007)
New Revision: 1821

Modified:
   trunk/src/gui/mainwindow.cpp
Log:
Fix a crash I introduced in r1805 that would occur if you tried to start Tor
twice in a row using a nonexistent binary. Also, add a couple comments about
why I did the disconnect()s the way I did the first time.


Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp	2007-08-02 05:33:33 UTC (rev 1820)
+++ trunk/src/gui/mainwindow.cpp	2007-08-02 06:39:49 UTC (rev 1821)
@@ -397,8 +397,10 @@
       ui.lblStartStopTor->setPixmap(QPixmap(IMG_START_TOR_48));
       ui.lblStartStopTor->setStatusTip(actionText);
 
-      disconnect(_startStopAct, SIGNAL(triggered()), this, SLOT(stop()));
-      disconnect(ui.lblStartStopTor, SIGNAL(clicked()), this, SLOT(stop()));
+      /* XXX: This might need to be smarter if we ever start connecting other
+       * slots to these triggered() and clicked() signals. */
+      disconnect(_startStopAct, SIGNAL(triggered()), this, 0);
+      disconnect(ui.lblStartStopTor, SIGNAL(clicked()), this, 0);
       connect(_startStopAct, SIGNAL(triggered()), this, SLOT(start()));
       connect(ui.lblStartStopTor, SIGNAL(clicked()), this, SLOT(start()));
   } else if (status == Stopping) {
@@ -427,8 +429,10 @@
       _newIdentityAct->setEnabled(true);
       ui.lblNewIdentity->setEnabled(true);
       
-      disconnect(_startStopAct, SIGNAL(triggered()), this, SLOT(start()));
-      disconnect(ui.lblStartStopTor, SIGNAL(clicked()), this, SLOT(start()));
+      /* XXX: This might need to be smarter if we ever start connecting other
+       * slots to these triggered() and clicked() signals. */
+      disconnect(_startStopAct, SIGNAL(triggered()), this, 0);
+      disconnect(ui.lblStartStopTor, SIGNAL(clicked()), this, 0);
       connect(_startStopAct, SIGNAL(triggered()), this, SLOT(stop()));
       connect(ui.lblStartStopTor, SIGNAL(clicked()), this, SLOT(stop()));
   } else { /* status == Starting */