diff browser_side/register.py @ 62:12e889a683ce SàT v0.2.0

server side: misc stuff: - fixed lot of misuse in callbacks - chat history fixed - a visual indicator now appear when we have message waiting from a contact - fixed About dialog size issue in webkit - fixed Drag'n'Drop for webkit - defaut room to join is now libervia@conference.libervia.org
author Goffi <goffi@goffi.org>
date Tue, 31 May 2011 17:06:59 +0200
parents c3ee630914ba
children 9d8e79ac4c9c
line wrap: on
line diff
--- a/browser_side/register.py	Tue May 31 17:03:37 2011 +0200
+++ b/browser_side/register.py	Tue May 31 17:06:59 2011 +0200
@@ -117,10 +117,10 @@
         else:
             self.changeMode("login")
 
-    def onLogin(self):
+    def onLogin(self, button):
         self.submit()
 
-    def onRegister(self):
+    def onRegister(self, button):
         print self.login_box.getText()
         if not re.match(r'^[a-z0-9_-]+$',self.login_box.getText(), re.IGNORECASE):
             self.warning_msg.setText('Invaling login, valid characters are a-z A-Z 0-9 _ -')
@@ -142,6 +142,8 @@
             Window.alert('You login and/or password is incorrect. Please try again')
         elif result == "LOGGED":
             self.callback()
+        elif result == "SESSION_ACTIVE":
+            Window.alert('Session already active, this should not happen, please contact contact the author to fix it')
         elif result == "ALREADY EXISTS":
             self.warning_msg.setText('This login already exists, please choose an other one')
             self.warning_msg.setVisible(True)