diff browser_side/panels.py @ 200:0f5c2f799913

browser side: clicking on the contacts list (contact item, group or the "contacts" main title) open a discussion or microblog
author Goffi <goffi@goffi.org>
date Mon, 25 Mar 2013 14:09:10 +0100
parents 39311c7dad77
children aa76793da353
line wrap: on
line diff
--- a/browser_side/panels.py	Wed Mar 20 23:42:53 2013 +0100
+++ b/browser_side/panels.py	Mon Mar 25 14:09:10 2013 +0100
@@ -263,11 +263,11 @@
 
     @classmethod
     def registerClass(cls):
-        base_widget.LiberviaWidget.addDropKey("GROUP", cls.onDropCreateGroup)
-        base_widget.LiberviaWidget.addDropKey("CONTACT_TITLE", cls.onDropCreateMeta)
+        base_widget.LiberviaWidget.addDropKey("GROUP", cls.createGroup)
+        base_widget.LiberviaWidget.addDropKey("CONTACT_TITLE", cls.createMeta)
 
     @classmethod
-    def onDropCreateGroup(cls, host, item):
+    def createGroup(cls, host, item):
         _new_panel = MicroblogPanel(host, [item]) #XXX: pyjamas doesn't support use of cls directly
         _new_panel.setAcceptedGroup(item)
         host.FillMicroblogPanel(_new_panel)
@@ -275,7 +275,7 @@
         return _new_panel
 
     @classmethod
-    def onDropCreateMeta(cls, host, item):
+    def createMeta(cls, host, item):
         _new_panel = MicroblogPanel(host, []) #XXX: pyjamas doesn't support use of cls directly
         host.FillMicroblogPanel(_new_panel)
         host.bridge.call('getMassiveLastMblogs', _new_panel.massiveInsert, 'ALL', [], 10)
@@ -476,10 +476,10 @@
 
     @classmethod
     def registerClass(cls):
-        base_widget.LiberviaWidget.addDropKey("CONTACT", cls.onDropCreate)
+        base_widget.LiberviaWidget.addDropKey("CONTACT", cls.createChat)
 
     @classmethod
-    def onDropCreate(cls, host, item):
+    def createChat(cls, host, item):
         _contact = JID(item)
         host.contact_panel.setContactMessageWaiting(_contact.bare, False)
         _new_panel = ChatPanel(host, _contact) #XXX: pyjamas doesn't seems to support creating with cls directly