Information pane remember position

The infopane will remember if it is currently up or down between
sessions.
This commit is contained in:
Bryan Schumaker 2010-10-30 16:57:48 -04:00
parent 81277d83b8
commit 19d1f885cd
1 changed files with 7 additions and 0 deletions

View File

@ -140,14 +140,20 @@ class TwoWayPane(InfoBar):
self.bar = self.contents
self.tab = InfoTab(self.down_button)
self.pack_start(self.tab)
if libsaria.prefs["INFOPANEUP"] == True:
self.up_button()
else:
self.down_button()
def up_button(self):
self.bar.hide()
self.tab.show()
libsaria.prefs["INFOPANEUP"] = True
def down_button(self):
self.bar.show()
self.tab.hide()
libsaria.prefs["INFOPANEUP"] = False
def init():
@ -165,6 +171,7 @@ def init():
import label
import image
libsaria.init_pref("INFOPANEUP", False)
info = TwoWayPane()
filter = FilterBar()
add_info_page("Now Playing", NowPlaying())