# HG changeset patch
# User Goffi <goffi@goffi.org>
# Date 1308352905 -7200
# Node ID 447dc8ac181b00dd8fd2fa1b4e64cca13b3e9cab
# Parent  dae64124ff248dc7e3e301f0a30bb2afec0be0b1
Adrien's uniBox design integration + lastPopup style

diff -r dae64124ff24 -r 447dc8ac181b browser_side/panels.py
--- a/browser_side/panels.py	Sat Jun 18 01:21:18 2011 +0200
+++ b/browser_side/panels.py	Sat Jun 18 01:21:45 2011 +0200
@@ -30,7 +30,7 @@
 from pyjamas.ui.HTMLPanel import HTMLPanel
 from pyjamas.ui.Grid import Grid
 from pyjamas.ui.DialogBox import DialogBox
-from pyjamas.ui.AutoComplete import AutoCompleteTextBox
+from pyjamas.ui.TextArea import TextArea
 from pyjamas.ui.MenuBar import MenuBar
 from pyjamas.ui.MenuBarPopupPanel import MenuBarPopupPanel
 from pyjamas.ui.MenuItem import MenuItem
@@ -82,6 +82,7 @@
                self.popup.getOffsetWidth() - 22,
                self.getAbsoluteTop() +
                self.getOffsetHeight() - 1)
+            self.popup.addStyleName('menuLastPopup')
 
 
 class Menu(SimplePanel):
@@ -372,17 +373,20 @@
         self.unibox.setWidth('100%')
         self.add(self.unibox)
 
-class UniBox(AutoCompleteTextBox):
+class UniBox(TextArea): #AutoCompleteTextBox):
     """This text box is used as a main typing point, for message, microblog, etc"""
 
     def __init__(self, host):
-        AutoCompleteTextBox.__init__(self)
+        TextArea.__init__(self)
+        #AutoCompleteTextBox.__init__(self)
         self._popup = None
         self._timer = Timer(notify=self._timeCb)
         self.host = host
+        self.setStyleName('uniBox')
 
     def addKey(self, key):
-        self.getCompletionItems().completions.append(key)
+        return
+        #self.getCompletionItems().completions.append(key)
 
     def removeKey(self, key):
         try:
@@ -480,10 +484,11 @@
             self.setText('')
             self._timeCb(None) #we remove the popup
 
-    def complete(self):
+    """def complete(self):
+        
         #self.visible=False #XXX: self.visible is not unset in pyjamas when ENTER is pressed and a completion is done
         #XXX: fixed directly on pyjamas, if the patch is accepted, no need to walk around this
-        return AutoCompleteTextBox.complete(self)
+        return AutoCompleteTextBox.complete(self)"""
 
 class MicroblogEntry(SimplePanel):