Mercurial > libervia-web
comparison browser_side/base_widget.py @ 309:05e264e96a1c
browser_side: make unibox optional
author | souliane <souliane@mailoo.org> |
---|---|
date | Sun, 29 Dec 2013 23:07:28 +0100 |
parents | a6b3715f0bd6 |
children | a0ded7df30f7 |
comparison
equal
deleted
inserted
replaced
308:0ca441ba4317 | 309:05e264e96a1c |
---|---|
182 self.add(header) | 182 self.add(header) |
183 self.setSize('100%', '100%') | 183 self.setSize('100%', '100%') |
184 self.addStyleName('widget') | 184 self.addStyleName('widget') |
185 if self.__selectable: | 185 if self.__selectable: |
186 self.addClickListener(self) | 186 self.addClickListener(self) |
187 self.addCloseListener(self.host.uni_box.onWidgetClosed) | 187 |
188 def onClose(sender): | |
189 """Check dynamically if the unibox is enable or not""" | |
190 if self.host.uni_box: | |
191 self.host.uni_box.onWidgetClosed(sender) | |
192 | |
193 self.addCloseListener(onClose) | |
188 self.host.registerWidget(self) | 194 self.host.registerWidget(self) |
189 | 195 |
190 def getDebugName(self): | 196 def getDebugName(self): |
191 return "%s (%s)" % (self, self.__title.getText()) | 197 return "%s (%s)" % (self, self.__title.getText()) |
192 | 198 |