[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1616: Save a few lines by making TorControl::closeCircuit() and cl (in trunk: . src/control src/gui/network)
Author: edmanm
Date: 2007-01-27 20:32:21 -0500 (Sat, 27 Jan 2007)
New Revision: 1616
Modified:
trunk/
trunk/src/control/torcontrol.h
trunk/src/gui/network/netviewer.cpp
trunk/src/gui/network/netviewer.h
Log:
r1632@adrastea: edmanm | 2007-01-27 19:04:44 -0500
Save a few lines by making TorControl::closeCircuit() and
closeStream() into slots.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /vidalia/local/trunk [r1632] on 54b3572a-7227-0410-958f-53ecd705b71a
Modified: trunk/src/control/torcontrol.h
===================================================================
--- trunk/src/control/torcontrol.h 2007-01-27 06:01:03 UTC (rev 1615)
+++ trunk/src/control/torcontrol.h 2007-01-28 01:32:21 UTC (rev 1616)
@@ -147,6 +147,7 @@
/** Gets a list of current streams. */
QList<Stream> getStreams(QString *errmsg = 0);
+public slots:
/** Closes the circuit specified by <b>circid</b>. If <b>ifUnused</b> is
* true, then the circuit will not be closed unless it is unused. */
bool closeCircuit(quint64 circid, bool ifUnused = false, QString *errmsg = 0);
Modified: trunk/src/gui/network/netviewer.cpp
===================================================================
--- trunk/src/gui/network/netviewer.cpp 2007-01-27 06:01:03 UTC (rev 1615)
+++ trunk/src/gui/network/netviewer.cpp 2007-01-28 01:32:21 UTC (rev 1616)
@@ -111,9 +111,9 @@
connect(ui.treeCircuitList, SIGNAL(zoomToCircuit(quint64)),
_map, SLOT(zoomToCircuit(quint64)));
connect(ui.treeCircuitList, SIGNAL(closeCircuit(quint64)),
- this, SLOT(closeCircuit(quint64)));
+ _torControl, SLOT(closeCircuit(quint64)));
connect(ui.treeCircuitList, SIGNAL(closeStream(quint64)),
- this, SLOT(closeStream(quint64)));
+ _torControl, SLOT(closeStream(quint64)));
/* Respond to changes in the status of the control connection */
connect(_torControl, SIGNAL(connected(bool)), ui.actionRefresh, SLOT(setEnabled(bool)));
@@ -249,20 +249,6 @@
_map->addCircuit(circuit.id(), circIds.hops());
}
-/** Asks Tor to close the circuit with the id <b>circid</b>. */
-void
-NetViewer::closeCircuit(quint64 circid)
-{
- _torControl->closeCircuit(circid);
-}
-
-/** Asks Tor to close the stream with the id <b>streamid</b>. */
-void
-NetViewer::closeStream(quint64 streamid)
-{
- _torControl->closeStream(streamid);
-}
-
/** Called when the user selects the "Help" action from the toolbar. */
void
NetViewer::help()
Modified: trunk/src/gui/network/netviewer.h
===================================================================
--- trunk/src/gui/network/netviewer.h 2007-01-27 06:01:03 UTC (rev 1615)
+++ trunk/src/gui/network/netviewer.h 2007-01-28 01:32:21 UTC (rev 1616)
@@ -70,10 +70,6 @@
void refresh();
/** Called when the user selects a circuit on the circuit list */
void circuitSelected(Circuit circuit);
- /** Called when the user selects a circuit to be closed. */
- void closeCircuit(quint64 circid);
- /** Called when the user selects a stream to be closed. */
- void closeStream(quint64 streamid);
/** Called when an IP has been resolved to geographic information. */
void resolved(int id, QList<GeoIp> geoips);
/** Called when the user selects a router in the list. */