ocarina: Reset library and right click menu

I added these based on the old library functions.  It seems to be
working so far!
This commit is contained in:
Bryan Schumaker 2011-05-21 15:43:29 -04:00
parent 17d83d8fff
commit c357a35313
1 changed files with 20 additions and 0 deletions

View File

@ -22,3 +22,23 @@ fill_library()
def refresh():
lib_page.clear()
fill_library()
import playlist
import queue
def clear():
queue.clear()
playlist.clear()
library.reset()
lib_page.clear()
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)