[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2617: Add stubs for doing the rest of the UPnP test dialog hullaba (in vidalia: . branches/upnp/src/vidalia branches/upnp/src/vidalia/config)
Author: edmanm
Date: 2008-05-26 23:30:19 -0400 (Mon, 26 May 2008)
New Revision: 2617
Modified:
vidalia/
vidalia/branches/upnp/src/vidalia/CMakeLists.txt
vidalia/branches/upnp/src/vidalia/config/serverpage.cpp
vidalia/branches/upnp/src/vidalia/config/serverpage.h
vidalia/branches/upnp/src/vidalia/config/serverpage.ui
Log:
r375@thebe: edmanm | 2008-05-26 23:30:57 -0400
Add stubs for doing the rest of the UPnP test dialog hullabaloo. (Just
displays the dialog and waits for you to click 'close' currently.)
Property changes on: vidalia
___________________________________________________________________
svk:merge ticket from /local/vidalia [r375] on 45a62a8a-8088-484c-baad-c7b3e776dd32
Modified: vidalia/branches/upnp/src/vidalia/CMakeLists.txt
===================================================================
--- vidalia/branches/upnp/src/vidalia/CMakeLists.txt 2008-05-27 03:19:40 UTC (rev 2616)
+++ vidalia/branches/upnp/src/vidalia/CMakeLists.txt 2008-05-27 03:30:19 UTC (rev 2617)
@@ -94,10 +94,12 @@
set(vidalia_SRCS ${vidalia_SRCS}
config/upnpcontrol.cpp
config/upnpcontrolthread.cpp
+ config/upnptestdialog.cpp
)
qt4_wrap_cpp(vidalia_SRCS
config/upnpcontrol.h
config/upnpcontrolthread.h
+ config/upnptestdialog.h
)
endif(USE_MINIUPNPC)
@@ -204,6 +206,9 @@
log/messagelog.ui
network/netviewer.ui
)
+if (USE_MINIUPNPC)
+ qt4_wrap_ui(vidalia_SRCS config/upnptestdialog.ui)
+endif(USE_MINIUPNPC)
## Add the resource files (icons, etc.)
qt4_add_resources(vidalia_SRCS
Modified: vidalia/branches/upnp/src/vidalia/config/serverpage.cpp
===================================================================
--- vidalia/branches/upnp/src/vidalia/config/serverpage.cpp 2008-05-27 03:19:40 UTC (rev 2616)
+++ vidalia/branches/upnp/src/vidalia/config/serverpage.cpp 2008-05-27 03:30:19 UTC (rev 2617)
@@ -27,6 +27,10 @@
#include "domainvalidator.h"
#include "nicknamevalidator.h"
+#if defined(USE_MINIUPNPC)
+#include "upnptestdialog.h"
+#endif
+
/* These are completely made up values (in bytes/sec). */
#define CABLE256_AVG_RATE (32*1024)
#define CABLE256_MAX_RATE (64*1024)
@@ -100,8 +104,11 @@
ui.lineMaxRateLimit->setValidator(
new QIntValidator(MIN_BANDWIDTH_RATE, MAX_BANDWIDTH_RATE, this));
-#ifndef USE_MINIUPNPC
+#if defined(USE_MINIUPNPC)
+ connect(ui.btnTestUpnp, SIGNAL(clicked()), this, SLOT(testUpnp()));
+#else
ui.chkEnableUpnp->setVisible(false);
+ ui.btnTestUpnp->setVisible(false);
#endif
}
@@ -493,3 +500,14 @@
}
}
+/** Tests automatic port forwarding using UPnP. */
+void
+ServerPage::testUpnp()
+{
+#if defined(USE_MINIUPNPC)
+ UPNPTestDialog dlg(this);
+
+ dlg.exec();
+#endif
+}
+
Modified: vidalia/branches/upnp/src/vidalia/config/serverpage.h
===================================================================
--- vidalia/branches/upnp/src/vidalia/config/serverpage.h 2008-05-27 03:19:40 UTC (rev 2616)
+++ vidalia/branches/upnp/src/vidalia/config/serverpage.h 2008-05-27 03:30:19 UTC (rev 2617)
@@ -74,6 +74,8 @@
void onDisconnected();
/** Copies the user's bridge relay identity to the clipboard. */
void copyBridgeIdentity();
+ /** Tests automatic port forwarding with UPnP. */
+ void testUpnp();
private:
/** Index values of rate values in the bandwidth limits dropdown box. */
Modified: vidalia/branches/upnp/src/vidalia/config/serverpage.ui
===================================================================
--- vidalia/branches/upnp/src/vidalia/config/serverpage.ui 2008-05-27 03:19:40 UTC (rev 2616)
+++ vidalia/branches/upnp/src/vidalia/config/serverpage.ui 2008-05-27 03:30:19 UTC (rev 2617)
@@ -146,7 +146,7 @@
<number>0</number>
</property>
<item>
- <widget class="QPushButton" name="btnTestUPNP" >
+ <widget class="QPushButton" name="btnTestUpnp" >
<property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum>
</property>