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

[vidalia-svn] r2684: Add a "Help" button to the UPnP test dialog. Clicking the bu (in vidalia: . trunk/src/vidalia/config)



Author: edmanm
Date: 2008-06-10 00:50:15 -0400 (Tue, 10 Jun 2008)
New Revision: 2684

Modified:
   vidalia/
   vidalia/trunk/src/vidalia/config/serverpage.cpp
   vidalia/trunk/src/vidalia/config/serverpage.h
   vidalia/trunk/src/vidalia/config/upnptestdialog.cpp
   vidalia/trunk/src/vidalia/config/upnptestdialog.h
Log:
 r498@thebe:  edmanm | 2008-06-10 00:50:41 -0400
 Add a "Help" button to the UPnP test dialog. Clicking the button displays the
 help topic on port forwarding.



Property changes on: vidalia
___________________________________________________________________
 svk:merge ticket from /local/vidalia [r498] on 45a62a8a-8088-484c-baad-c7b3e776dd32

Modified: vidalia/trunk/src/vidalia/config/serverpage.cpp
===================================================================
--- vidalia/trunk/src/vidalia/config/serverpage.cpp	2008-06-10 04:35:13 UTC (rev 2683)
+++ vidalia/trunk/src/vidalia/config/serverpage.cpp	2008-06-10 04:50:15 UTC (rev 2684)
@@ -507,8 +507,17 @@
 #if defined(USE_MINIUPNPC)
   UPNPTestDialog dlg(ui.lineServerPort->text().toUInt(),
                      ui.lineDirPort->text().toUInt(), this);
+  
+  connect(&dlg, SIGNAL(help()), this, SLOT(upnpHelp()));
 
   dlg.exec();
 #endif
 }
 
+/** Called when the user clicks the UPnP test dialog's help button. */
+void
+ServerPage::upnpHelp()
+{
+  emit helpRequested("server.upnp");
+}
+

Modified: vidalia/trunk/src/vidalia/config/serverpage.h
===================================================================
--- vidalia/trunk/src/vidalia/config/serverpage.h	2008-06-10 04:35:13 UTC (rev 2683)
+++ vidalia/trunk/src/vidalia/config/serverpage.h	2008-06-10 04:50:15 UTC (rev 2684)
@@ -76,6 +76,8 @@
   void copyBridgeIdentity();
   /** Tests automatic port forwarding with UPnP. */
   void testUpnp();
+  /** Called when the user clicks the UPnP test dialog's help button. */
+  void upnpHelp();
 
 private:
   /** Index values of rate values in the bandwidth limits dropdown box. */

Modified: vidalia/trunk/src/vidalia/config/upnptestdialog.cpp
===================================================================
--- vidalia/trunk/src/vidalia/config/upnptestdialog.cpp	2008-06-10 04:35:13 UTC (rev 2683)
+++ vidalia/trunk/src/vidalia/config/upnptestdialog.cpp	2008-06-10 04:50:15 UTC (rev 2684)
@@ -26,7 +26,8 @@
   ui.setupUi(this);
   _upnp = UPNPControl::instance();
 
-  ui.buttonBox->setStandardButtons(QDialogButtonBox::Close);
+  ui.buttonBox->setStandardButtons(QDialogButtonBox::Close
+                                     | QDialogButtonBox::Help);
   
   ui.progressBar->setValue(0);
   ui.progressBar->setFormat("");
@@ -73,7 +74,8 @@
 UPNPTestDialog::testSuccessful()
 {
   ui.buttonBox->setEnabled(true);
-  ui.buttonBox->setStandardButtons(QDialogButtonBox::Close);
+  ui.buttonBox->setStandardButtons(QDialogButtonBox::Close
+                                     | QDialogButtonBox::Help);
 
   disconnect(UPNPControl::instance(), 0, this, 0);
 }
@@ -85,7 +87,8 @@
 {
   ui.buttonBox->setEnabled(true);
   ui.buttonBox->setStandardButtons(QDialogButtonBox::Retry
-                                     | QDialogButtonBox::Close);
+                                     | QDialogButtonBox::Close
+                                     | QDialogButtonBox::Help);
   
   disconnect(UPNPControl::instance(), 0, this, 0);
 }
@@ -153,6 +156,11 @@
       done(0);
       break;
 
+    case QDialogButtonBox::Help:
+      emit help();
+      done(0);
+      break;
+
     default:
       break;
   }

Modified: vidalia/trunk/src/vidalia/config/upnptestdialog.h
===================================================================
--- vidalia/trunk/src/vidalia/config/upnptestdialog.h	2008-06-10 04:35:13 UTC (rev 2683)
+++ vidalia/trunk/src/vidalia/config/upnptestdialog.h	2008-06-10 04:50:15 UTC (rev 2684)
@@ -35,6 +35,11 @@
    * restored when the test dialog is closed. */
   UPNPTestDialog(quint16 orPort, quint16 dirPort, QWidget *parent = 0);
 
+signals:
+  /** Emitted when the user clicks the 'Help' button requesting the help topic
+   * on port forwarding. */
+  void help();
+
 protected slots:
   /** Shows or hides the dialog based on <b>visible</b>. The UPnP test will be
    * started when the dialog is first shown. */