Fix show/hiding of sidebar

This commit is contained in:
Andrew Resch 2008-08-24 06:03:22 +00:00
parent 1747bd9894
commit 239fcfd533
2 changed files with 604 additions and 596 deletions

File diff suppressed because it is too large Load Diff

View File

@ -51,15 +51,21 @@ class SideBar(component.Component):
self.notebook = glade.get_widget("sidebar_notebook")
self.hpaned = glade.get_widget("hpaned")
self.is_visible = True
self.hpaned_position = self.hpaned.get_position()
# Tabs holds references to the Tab widgets by their name
self.tabs = {}
def visible(self, visible):
if visible:
if self.hpaned_position:
self.hpaned.set_position(self.hpaned_position)
self.notebook.show()
else:
self.notebook.hide()
# Store the position for restoring upon show()
self.hpaned_position = self.hpaned.get_position()
self.hpaned.set_position(-1)
self.is_visible = visible