86bac243d2
This clears whatever is on the current page and saves changes (in the case of the playlist and library)
63 lines
1.4 KiB
Python
63 lines
1.4 KiB
Python
# Bryan Schumaker (4 / 17 / 2011)
|
|
|
|
import gtk
|
|
import header
|
|
import footer
|
|
SHRINK = gtk.SHRINK
|
|
GROW = gtk.FILL | gtk.EXPAND
|
|
|
|
class OcarinaPage(gtk.Table):
|
|
def __init__(self, content, label):
|
|
gtk.Table.__init__(self, 3, 1, False)
|
|
self.content = content
|
|
self.label = label
|
|
self.block_shortcuts = False
|
|
self.attach_center(content)
|
|
self.show()
|
|
|
|
def visible(self):
|
|
self.attach_top(header.header)
|
|
self.attach_bottom(footer.footer)
|
|
|
|
def invisible(self):
|
|
if header.header.get_parent() == self:
|
|
self.remove(header.header)
|
|
if footer.footer.get_parent() == self:
|
|
self.remove(footer.footer)
|
|
|
|
def attach_top(self, content):
|
|
self.attach(content, 0, 1, 0, 1, GROW, SHRINK)
|
|
|
|
def attach_center(self, content):
|
|
self.attach(content, 0, 1, 1, 2)
|
|
|
|
def attach_bottom(self, content):
|
|
self.attach(content, 0, 1, 2, 3, GROW, SHRINK)
|
|
|
|
def filter(self, text):
|
|
pass
|
|
|
|
def goto(self):
|
|
pass
|
|
|
|
def clear(self):
|
|
pass
|
|
|
|
#def visible(self):
|
|
#if self.add_header == True:
|
|
#self.pack_start(header.header, False, False)
|
|
#self.pack_start(self.content, True, True)
|
|
#if self.add_footer == True:
|
|
#self.pack_start(footer.footer, False, False)
|
|
#if self.vis_func:
|
|
#self.vis_func()
|
|
|
|
#def invisible(self):
|
|
#if self.add_header == True:
|
|
#self.remove(header.header)
|
|
#self.remove(self.content)
|
|
#if self.add_footer == True:
|
|
#self.remove(footer.footer)
|
|
#if self.invis_func:
|
|
#self.invis_func()
|