diff libervia.py @ 23:0ce2a57b34ca

added tab panel
author Goffi <goffi@goffi.org>
date Wed, 20 Apr 2011 02:47:22 +0200
parents 586f69e85559
children 258dfaa1035f
line wrap: on
line diff
--- a/libervia.py	Sun Apr 17 00:38:33 2011 +0200
+++ b/libervia.py	Wed Apr 20 02:47:22 2011 +0200
@@ -124,8 +124,8 @@
     def _timeCb(self, timer):
         if self._popup:
             self._popup.hide()
-        del self._popup
-        self._popup = None
+            del self._popup
+            self._popup = None
 
     def _getTarget(self, txt):
         """Say who will receive the messsage
@@ -160,8 +160,7 @@
         else:
             _target = self._getTarget(_txt)
             if _target != self._popup.target_data:
-                self._popup.hide()
-                del self._popup
+                self._timeCb(None) #we remove the popup
                 self.showWarning(_target)
 
         self._timer.schedule(2000)
@@ -176,6 +175,7 @@
                     _chat = self.host.selected
                     self.host.bridge.call('sendMessage', None, str(_chat.target), _txt, '', 'chat')
             self.setText('')
+            self._timeCb(None) #we remove the popup
 
     def complete(self):
         #self.visible=False #XXX: self.visible is not unset in pyjamas when ENTER is pressed and a completion is done
@@ -194,11 +194,12 @@
         self.statusPanel = StatusPanel(self)
         self.contactPanel = ContactPanel(self)
         self.panel = MainPanel(self)
-        self.middle_panel = self.panel.middle_panel
+        self.discuss_panel = self.panel.discuss_panel
+        self.tab_panel = self.panel.tab_panel 
         self.mpanels = [EmptyPanel(self), MicroblogPanel(self, accept_all=True), EmptyPanel(self)]
-        self.middle_panel.changePanel(0,self.mpanels[0])
-        self.middle_panel.changePanel(1,self.mpanels[1])
-        self.middle_panel.changePanel(2,self.mpanels[2])
+        self.discuss_panel.changePanel(0,self.mpanels[0])
+        self.discuss_panel.changePanel(1,self.mpanels[1])
+        self.discuss_panel.changePanel(2,self.mpanels[2])
         self._dialog = None
         RootPanel().add(self.panel)
         self._register = RegisterCall()