From 40a10d4a8f7b18ad32382a5ef84b9df7afc6b94b Mon Sep 17 00:00:00 2001
From: yanmorin <yanmorin>
Date: Fri, 20 Jan 2006 16:37:19 +0000
Subject: [PATCH] Re-enable register button in configuration panel ui Todo: to
 send a popup if the registration has failed or connected Todo: use the
 account arg on the server

---
 src/gui/qt/ConfigurationPanel.ui    | 6 +++---
 src/gui/qt/ConfigurationPanel.ui.h  | 2 +-
 src/gui/qt/PhoneLineManagerImpl.cpp | 2 +-
 src/gui/qt/SFLPhoneApp.cpp          | 1 +
 src/gui/qt/globals.h                | 2 --
 5 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/gui/qt/ConfigurationPanel.ui b/src/gui/qt/ConfigurationPanel.ui
index ced355afca..81f81c26c4 100644
--- a/src/gui/qt/ConfigurationPanel.ui
+++ b/src/gui/qt/ConfigurationPanel.ui
@@ -310,10 +310,10 @@
                                             </spacer>
                                             <widget class="QPushButton">
                                                 <property name="name">
-                                                    <cstring>Register</cstring>
+                                                    <cstring>buttonRegister</cstring>
                                                 </property>
                                                 <property name="enabled">
-                                                    <bool>false</bool>
+                                                    <bool>true</bool>
                                                 </property>
                                                 <property name="text">
                                                     <string>Register</string>
@@ -1439,7 +1439,7 @@ Montreal, Quebec H2T 1S6&lt;/p&gt;</string>
     <tabstop>password</tabstop>
     <tabstop>sipproxy</tabstop>
     <tabstop>autoregister</tabstop>
-    <tabstop>Register</tabstop>
+    <tabstop>buttonRegister</tabstop>
     <tabstop>buttonOk</tabstop>
     <tabstop>buttonCancel</tabstop>
     <tabstop>Tab_Signalisations</tabstop>
diff --git a/src/gui/qt/ConfigurationPanel.ui.h b/src/gui/qt/ConfigurationPanel.ui.h
index 1500e56bee..47708df748 100644
--- a/src/gui/qt/ConfigurationPanel.ui.h
+++ b/src/gui/qt/ConfigurationPanel.ui.h
@@ -107,7 +107,7 @@ void ConfigurationPanel::init()
 			 "About", 
 			 Menu);
     
-    QObject::connect(Register, SIGNAL(clicked()),
+    QObject::connect(buttonRegister, SIGNAL(clicked()),
 		     this, SIGNAL(needRegister()));
 }
 
diff --git a/src/gui/qt/PhoneLineManagerImpl.cpp b/src/gui/qt/PhoneLineManagerImpl.cpp
index e034c9ec87..5feeaad2dc 100644
--- a/src/gui/qt/PhoneLineManagerImpl.cpp
+++ b/src/gui/qt/PhoneLineManagerImpl.cpp
@@ -130,7 +130,7 @@ PhoneLineManagerImpl::registerToServer()
   isInitialized();
   
   Request *r = mSession->registerToServer();
-  QObject::connect(r, SIGNAL(success()),
+  QObject::connect(r, SIGNAL(success(QString, QString)),
 		   this, SIGNAL(registered()));
 }
 
diff --git a/src/gui/qt/SFLPhoneApp.cpp b/src/gui/qt/SFLPhoneApp.cpp
index 4d34156f6a..c72e60cf06 100644
--- a/src/gui/qt/SFLPhoneApp.cpp
+++ b/src/gui/qt/SFLPhoneApp.cpp
@@ -57,6 +57,7 @@ SFLPhoneApp::SFLPhoneApp(int argc, char **argv)
   Requester::instance().registerObject< Request >(QString("stoptone"));
   Requester::instance().registerObject< Request >(QString("playdtmf"));
 
+  Requester::instance().registerObject< Request >(QString("register"));
   Requester::instance().registerObject< ConfigGetAllRequest >(QString("configgetall"));
   Requester::instance().registerObject< ConfigSaveRequest >(QString("configsave"));
   Requester::instance().registerObject< StopRequest >(QString("stop"));
diff --git a/src/gui/qt/globals.h b/src/gui/qt/globals.h
index 1d96f222ad..6d44633980 100644
--- a/src/gui/qt/globals.h
+++ b/src/gui/qt/globals.h
@@ -21,8 +21,6 @@
 #ifndef SFLPHONE_GLOBAL_H
 #define SFLPHONE_GLOBAL_H
 
-#define DEBUG
-
 #define NB_PHONELINES 6
 #define PROGNAME "SFLPhone"
 #define VERSION "0.4.2"
-- 
GitLab