ocarina/ocarina/playlist.py
Bryan Schumaker ed13a467ea Rename ocarina.collection
I have ocarina.collection to ocarina.source to reflect the naming change
in libsaria.
2010-12-03 08:35:13 -05:00

41 lines
777 B
Python

# Bryan Schumaker (11/26/2010)
import ocarina
from ocarina import body
from ocarina import source
import menu
gtk = ocarina.gtk
sources = ocarina.libsaria.sources
playlist = sources.playlist
visible = playlist.is_visible
plist_page = source.Source()
def init():
body.add_page("Playlist", plist_page)
playlist.load_bg(filler)
def filler():
plist_page.init(filter, is_visible, right_click, reset)
plist_page.fill(playlist.walk)
def filter(text):
playlist.filter(text)
plist_page.refilter()
def is_visible(list, iter):
return visible(list[iter][0])
def reset():
plist_page.clear()
playlist.reset()
playlist.save()
def refresh(*args):
plist_page.clear()
plist_page.fill(playlist.walk)
def right_click(button, time):
menu.make_plist_menu(button, time)