mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 12:34:43 +00:00
Fix show/hiding of sidebar
This commit is contained in:
parent
1747bd9894
commit
239fcfd533
File diff suppressed because it is too large
Load Diff
@ -51,15 +51,21 @@ class SideBar(component.Component):
|
|||||||
self.notebook = glade.get_widget("sidebar_notebook")
|
self.notebook = glade.get_widget("sidebar_notebook")
|
||||||
self.hpaned = glade.get_widget("hpaned")
|
self.hpaned = glade.get_widget("hpaned")
|
||||||
self.is_visible = True
|
self.is_visible = True
|
||||||
|
self.hpaned_position = self.hpaned.get_position()
|
||||||
|
|
||||||
# Tabs holds references to the Tab widgets by their name
|
# Tabs holds references to the Tab widgets by their name
|
||||||
self.tabs = {}
|
self.tabs = {}
|
||||||
|
|
||||||
def visible(self, visible):
|
def visible(self, visible):
|
||||||
if visible:
|
if visible:
|
||||||
|
if self.hpaned_position:
|
||||||
|
self.hpaned.set_position(self.hpaned_position)
|
||||||
self.notebook.show()
|
self.notebook.show()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.notebook.hide()
|
self.notebook.hide()
|
||||||
|
# Store the position for restoring upon show()
|
||||||
|
self.hpaned_position = self.hpaned.get_position()
|
||||||
self.hpaned.set_position(-1)
|
self.hpaned.set_position(-1)
|
||||||
|
|
||||||
self.is_visible = visible
|
self.is_visible = visible
|
||||||
|
Loading…
x
Reference in New Issue
Block a user