From 17537c77100fab5e801a19d4b0b3d8bff3f72cbb Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Mon, 05 Jul 2010 01:34:14 +0000 Subject: Window: allow removing the toolbar_box Allow the toolbar_box to be removed by setting it to None, like is supported for canvas. Signed-off-by: Sascha Silbe Acked-by: Simon Schampijer --- diff --git a/src/sugar/graphics/window.py b/src/sugar/graphics/window.py index e3bef6b..8f368a8 100644 --- a/src/sugar/graphics/window.py +++ b/src/sugar/graphics/window.py @@ -191,8 +191,9 @@ class Window(gtk.Window): if self._toolbar_box: self.__vbox.remove(self._toolbar_box) - self.__vbox.pack_start(toolbar_box, False) - self.__vbox.reorder_child(toolbar_box, 0) + if toolbar_box: + self.__vbox.pack_start(toolbar_box, False) + self.__vbox.reorder_child(toolbar_box, 0) self._toolbar_box = toolbar_box -- cgit v0.9.1