Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-05-14 13:48:36 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-05-14 13:48:36 (GMT)
commitc84e21aa9ef2a5223cd4fbf1fb5792d3b031b054 (patch)
tree9740276a6650228f6e1ee2dd18d918ad629bca3f /sugar/graphics
parent9e1e85188423e971c34a6d7437090f5fcd867f14 (diff)
Hide the tabs bar when there is only one toolbar.
Fix sugar.Browser
Diffstat (limited to 'sugar/graphics')
-rw-r--r--sugar/graphics/toolbox.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/sugar/graphics/toolbox.py b/sugar/graphics/toolbox.py
index 968ae56..17b1b5f 100644
--- a/sugar/graphics/toolbox.py
+++ b/sugar/graphics/toolbox.py
@@ -31,6 +31,7 @@ class Toolbox(gtk.VBox):
self._notebook = gtk.Notebook()
self._notebook.set_tab_pos(gtk.POS_BOTTOM)
self._notebook.set_show_border(False)
+ self._notebook.set_show_tabs(False)
self.pack_start(self._notebook)
self._notebook.show()
@@ -44,6 +45,12 @@ class Toolbox(gtk.VBox):
self._notebook.append_page(toolbar_box, label)
toolbar_box.show()
-
+
+ if self._notebook.get_n_pages() > 1:
+ self._notebook.set_show_tabs(True)
+
def remove_toolbar(self, index):
self._notebook.remove_page(index)
+
+ if self._notebook.get_n_pages() < 2:
+ self._notebook.set_show_tabs(False)