Ocarina: Playlist and library tabs
I've readded these tabs, but I don't fill them in yet. That'll wait until I rewrite sources.
This commit is contained in:
parent
b2db7d3327
commit
d20d4c3fcd
|
@ -21,6 +21,9 @@ def quit(window, event):
|
||||||
|
|
||||||
import window
|
import window
|
||||||
|
|
||||||
|
import playlist
|
||||||
|
import library
|
||||||
|
|
||||||
libsaria.startup()
|
libsaria.startup()
|
||||||
print "Startup took:", uptime()
|
print "Startup took:", uptime()
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
|
|
@ -15,6 +15,12 @@ class OcarinaPage(gtk.Table):
|
||||||
self.attach_center(content)
|
self.attach_center(content)
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
|
def visible(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def invisible(self):
|
||||||
|
pass
|
||||||
|
|
||||||
def attach_top(self, content):
|
def attach_top(self, content):
|
||||||
self.attach(content, 0, 1, 0, 1, GROW, SHRINK)
|
self.attach(content, 0, 1, 0, 1, GROW, SHRINK)
|
||||||
|
|
||||||
|
|
|
@ -1,58 +1,64 @@
|
||||||
# Bryan Schumaker (11/26/2010)
|
# Bryan Schumaker (11/26/2010)
|
||||||
|
|
||||||
import ocarina
|
import sources
|
||||||
from ocarina import body
|
import body
|
||||||
from ocarina import sources
|
|
||||||
import menu
|
|
||||||
|
|
||||||
plist_page = sources.Source()
|
playlist_page = sources.Source()
|
||||||
|
PLAYLIST_PAGE = body.add_page(playlist_page, "Playlist")
|
||||||
|
|
||||||
gtk = ocarina.gtk
|
#import ocarina
|
||||||
sources = ocarina.libsaria.sources
|
#from ocarina import body
|
||||||
playlist = sources.playlist
|
#from ocarina import sources
|
||||||
visible = playlist.is_visible
|
#import menu
|
||||||
|
|
||||||
def init():
|
#plist_page = sources.Source()
|
||||||
body.add_page("Playlist", plist_page)
|
|
||||||
sources.init_src(playlist.init_bg, filler)
|
|
||||||
|
|
||||||
def filler():
|
#gtk = ocarina.gtk
|
||||||
plist_page.init(filter, is_visible, right_click, playlist.play_id, reset)
|
#sources = ocarina.libsaria.sources
|
||||||
menu.add_plist_menu_item("Add to queue", add_selected_to_queue)
|
#playlist = sources.playlist
|
||||||
menu.add_plist_menu_item("Remove from playlist", rm_selected_from_playlist)
|
#visible = playlist.is_visible
|
||||||
ocarina.libsaria.event.invite("POSTLOADPLAYLIST", refresh)
|
|
||||||
plist_page.fill(playlist.walk, True)
|
|
||||||
|
|
||||||
def filter(text):
|
#def init():
|
||||||
playlist.filter(text)
|
#body.add_page("Playlist", plist_page)
|
||||||
plist_page.refilter()
|
#sources.init_src(playlist.init_bg, filler)
|
||||||
plist_page.goto()
|
|
||||||
|
|
||||||
def is_visible(list, iter):
|
#def filler():
|
||||||
return visible(list[iter][0])
|
#plist_page.init(filter, is_visible, right_click, playlist.play_id, reset)
|
||||||
|
#menu.add_plist_menu_item("Add to queue", add_selected_to_queue)
|
||||||
|
#menu.add_plist_menu_item("Remove from playlist", rm_selected_from_playlist)
|
||||||
|
#ocarina.libsaria.event.invite("POSTLOADPLAYLIST", refresh)
|
||||||
|
#plist_page.fill(playlist.walk, True)
|
||||||
|
|
||||||
def reset():
|
#def filter(text):
|
||||||
plist_page.clear()
|
#playlist.filter(text)
|
||||||
playlist.reset()
|
#plist_page.refilter()
|
||||||
playlist.save()
|
#plist_page.goto()
|
||||||
|
|
||||||
def refresh(*args):
|
#def is_visible(list, iter):
|
||||||
plist_page.clear()
|
#return visible(list[iter][0])
|
||||||
plist_page.fill(playlist.walk)
|
|
||||||
|
|
||||||
def right_click(button, time):
|
#def reset():
|
||||||
menu.make_plist_menu(button, time)
|
#plist_page.clear()
|
||||||
|
#playlist.reset()
|
||||||
|
#playlist.save()
|
||||||
|
|
||||||
def rm_selected_from_playlist(menu):
|
#def refresh(*args):
|
||||||
plist_page.for_each_selected_id(playlist.rm_id)
|
#plist_page.clear()
|
||||||
playlist.save()
|
#plist_page.fill(playlist.walk)
|
||||||
refresh()
|
|
||||||
|
|
||||||
def add_to_playlist(source_page):
|
#def right_click(button, time):
|
||||||
source_page.for_each_selected_id(playlist.add_id)
|
#menu.make_plist_menu(button, time)
|
||||||
playlist.save()
|
|
||||||
refresh()
|
|
||||||
|
|
||||||
def add_selected_to_queue(menu):
|
#def rm_selected_from_playlist(menu):
|
||||||
import queue
|
#plist_page.for_each_selected_id(playlist.rm_id)
|
||||||
queue.add_to_queue(plist_page)
|
#playlist.save()
|
||||||
|
#refresh()
|
||||||
|
|
||||||
|
#def add_to_playlist(source_page):
|
||||||
|
#source_page.for_each_selected_id(playlist.add_id)
|
||||||
|
#playlist.save()
|
||||||
|
#refresh()
|
||||||
|
|
||||||
|
#def add_selected_to_queue(menu):
|
||||||
|
#import queue
|
||||||
|
#queue.add_to_queue(plist_page)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user