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:
parent
17d83d8fff
commit
c357a35313
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue