Mercurial > libervia-web
changeset 426:77d8f55fc5f0
browser_side: hide the presence/status panel until the connection is made
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 26 Mar 2014 14:16:11 +0100 |
parents | 19bd203daa27 |
children | b5b440e6ea16 |
files | browser_side/panels.py libervia.py |
diffstat | 2 files changed, 12 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/browser_side/panels.py Wed Mar 26 13:39:08 2014 +0100 +++ b/browser_side/panels.py Wed Mar 26 14:16:11 2014 +0100 @@ -1321,9 +1321,6 @@ self.unibox_panel = UniBoxPanel(host) self.unibox_panel.setVisible(False) - # status bar - status = host.status_panel - # contacts self._contacts = HorizontalPanel() self._contacts.addStyleName('globalLeftArea') @@ -1338,12 +1335,12 @@ self.tab_panel.add(self.discuss_panel, "Discussions") self.tab_panel.selectTab(0) - header = AbsolutePanel() - header.add(self.menu) - header.add(self.unibox_panel) - header.add(status) - header.setStyleName('header') - self.add(header) + self.header = AbsolutePanel() + self.header.add(self.menu) + self.header.add(self.unibox_panel) + self.header.add(self.host.status_panel) + self.header.setStyleName('header') + self.add(self.header) self._hpanel = HorizontalPanel() self._hpanel.add(self._contacts)
--- a/libervia.py Wed Mar 26 13:39:08 2014 +0100 +++ b/libervia.py Wed Mar 26 14:16:11 2014 +0100 @@ -167,7 +167,7 @@ self.bridge = BridgeCall() self.bridge_signals = BridgeSignals(self) self.uni_box = None - self.status_panel = panels.PresenceStatusPanel(self) + self.status_panel = HTML('<br />') self.contact_panel = ContactPanel(self) self.panel = panels.MainPanel(self) self.discuss_panel = self.panel.discuss_panel @@ -332,6 +332,11 @@ self._register_box.hide() del self._register_box # don't work if self._register_box is None + # display the real presence status panel + self.panel.header.remove(self.status_panel) + self.status_panel = panels.PresenceStatusPanel(self) + self.panel.header.add(self.status_panel) + #it's time to fill the page self.bridge.call('getContacts', self._getContactsCB) self.bridge.call('getParamsUI', self._getParamsUICB)