QTfrontend/hwform.cpp
changeset 8380 0b375a3ceaa0
parent 8377 869f80966a77
parent 8364 fbc9bcc6c39d
child 8383 b557c73a7593
--- a/QTfrontend/hwform.cpp	Mon Jan 14 11:52:19 2013 +0100
+++ b/QTfrontend/hwform.cpp	Mon Jan 14 12:07:51 2013 +0100
@@ -1340,6 +1340,8 @@
         {
         //open dialog
             HWPasswordDialog * pwDialog = new HWPasswordDialog(this);
+            // make the "new account" button dialog open a browser with the registration page
+            connect(pwDialog->pbNewAccount, SIGNAL(clicked()), this, SLOT(openRegistrationPage()));
             pwDialog->cbSave->setChecked(config->value("net/savepassword", true).toBool());
 
         //if nickname is present, put it into the field
@@ -1927,6 +1929,11 @@
         ShowErrorMessage(QMessageBox::tr("File association failed."));
 }
 
+void HWForm::openRegistrationPage() 
+{
+    QDesktopServices::openUrl(QUrl("http://www.hedgewars.org/user/register"));
+}    
+
 void HWForm::saveDemoWithCustomName()
 {
     if(!m_lastDemo.isEmpty())