changeset 657:0b7e4226378d frontends_multi_profiles

browser_side: hide the tab bar and contact list's toggle button until the profile is connected
author souliane <souliane@mailoo.org>
date Fri, 27 Feb 2015 13:12:28 +0100
parents 4dbd99de3aaa
children 476d8d9973d3
files src/browser/libervia_main.py src/browser/sat_browser/libervia_widget.py src/browser/sat_browser/main_panel.py
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser/libervia_main.py	Fri Feb 27 13:00:04 2015 +0100
+++ b/src/browser/libervia_main.py	Fri Feb 27 13:12:28 2015 +0100
@@ -305,9 +305,10 @@
             self._register_box.hide()
             del self._register_box  # don't work if self._register_box is None
 
-        # display the real presence status panel
+        # display the presence status panel and tab bar
         self.presence_status_panel = main_panel.PresenceStatusPanel(self)
         self.panel.addPresenceStatusPanel(self.presence_status_panel)
+        self.panel.tab_panel.getTabBar().setVisible(True)
 
         self.bridge_signals.call('getSignals', self.bridge_signals.signalHandler)
 
--- a/src/browser/sat_browser/libervia_widget.py	Fri Feb 27 13:00:04 2015 +0100
+++ b/src/browser/sat_browser/libervia_widget.py	Fri Feb 27 13:12:28 2015 +0100
@@ -751,6 +751,7 @@
         self.host = host
         self.setStyleName('liberviaTabPanel')
         self.tabBar.addTab(u'✚', asHTML=True)
+        self.tabBar.setVisible(False)  # set to True when profile is logged
         self.tabBar.addStyleDependentName('oneTab')
 
     def onTabSelected(self, sender, tabIndex):
--- a/src/browser/sat_browser/main_panel.py	Fri Feb 27 13:00:04 2015 +0100
+++ b/src/browser/sat_browser/main_panel.py	Fri Feb 27 13:12:28 2015 +0100
@@ -257,9 +257,9 @@
         self.setCellWidth(self.tab_panel, '100%')
         self.setCellHeight(self.tab_panel, '100%')
         self.add(self.tab_panel.getTabBar(), DockPanel.SOUTH)
-        self.add(self.contacts_switch, DockPanel.WEST)
 
     def addContactList(self, contact_list):
+        self.add(self.contacts_switch, DockPanel.WEST)
         self.add(contact_list, DockPanel.WEST)
 
     def addPresenceStatusPanel(self, panel):