ocarina: Remove oldlibrary code

The new library covers everything, so this is no longer needed.
This commit is contained in:
Bryan Schumaker 2011-05-21 22:34:39 -04:00
parent 248dd283ff
commit ac0f23ab80
4 changed files with 1 additions and 61 deletions

View File

@ -23,7 +23,6 @@ import window
import playlist
import queue
import library
import oldlibrary
import callbacks
def run():

View File

@ -83,7 +83,7 @@ def export_button(show):
return make_button(gtk.STOCK_CONVERT, export.export, "Export Library", show)
def update_button(show):
return make_button(gtk.STOCK_REFRESH, sources.oldlibrary.update_bg, "Update Library", show)
return make_button(gtk.STOCK_REFRESH, sources.library.update_lib, "Update Library", show)
def open_button(show):
def open_func():

View File

@ -7,7 +7,6 @@ from ocarina.body import footer
from libsaria import callbacks
import playlist
import library
import oldlibrary
def on_play():
footer.on_play()
@ -39,10 +38,6 @@ def on_load_playlist():
playlist.refresh()
callbacks.on_load_playlist = on_load_playlist
def on_load_library():
oldlibrary.refresh()
callbacks.on_new_source = on_load_library
def library_updated():
library.refresh()
callbacks.on_library_updated = library_updated

View File

@ -1,54 +0,0 @@
# Bryan Schumaker (11/26/2010)
import libsaria
import sources
import body
library = libsaria.sources.oldlibrary
lib_page = sources.Source()
LIB_PAGE = body.add_page(lib_page, "Old Library")
LIB_PAGE.goto = lib_page.goto
def set_label_text():
LIB_PAGE.label.set_text("Old Library (%s)" % library.num_visible())
def fill_library():
songs = library.walk_library("id", "title", "lenstr", "artist", "album", "year")
lib_page.insert(songs)
set_label_text()
fill_library()
def refresh():
lib_page.clear()
fill_library()
def do_refilter(list, iter):
return library.is_visible(list[iter][0])
lib_page.set_filter_func(do_refilter)
def filter(text):
library.filter(text)
lib_page.refilter()
set_label_text()
LIB_PAGE.filter = filter
import playlist
import queue
def clear():
queue.clear()
playlist.clear()
lib_page.clear()
library.reset()
library.save()
refresh()
LIB_PAGE.clear = clear
menu_items = [
("Add to Queue", queue.add_to_queue),
("Add to Playlist", playlist.add_to_playlist),
]
def show_menu(event):
m = sources.Menu(lib_page, menu_items)
m.show(event)
lib_page.set_right_click(show_menu)