Anna Schumaker
ac7001c3bf
- curds.playlist.current() for the currently selected playlist - curds.playlist.lookup() for lookups Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
33 lines
760 B
Python
33 lines
760 B
Python
# Copyright 2019 (c) Anna Schumaker.
|
|
from . import gtk
|
|
import curds
|
|
import os
|
|
|
|
Chooser = gtk.Builder.get_object("library_chooser")
|
|
Popover = gtk.Builder.get_object("library_popover")
|
|
|
|
|
|
def add_clicked(button):
|
|
folder = os.path.join(os.path.expanduser("~"), "Music")
|
|
Chooser.set_filename(folder)
|
|
Popover.popup()
|
|
|
|
Add = gtk.Builder.get_object("library_add")
|
|
Add.connect("clicked", add_clicked)
|
|
|
|
|
|
def cancel_clicked(button):
|
|
Popover.popdown()
|
|
|
|
Cancel = gtk.Builder.get_object("library_cancel")
|
|
Cancel.connect("clicked", cancel_clicked)
|
|
|
|
|
|
def ok_clicked(button):
|
|
Popover.popdown()
|
|
path = Chooser.get_filename()
|
|
curds.playlist.lookup("Libraries").lookup(path)
|
|
|
|
Ok = gtk.Builder.get_object("library_ok")
|
|
Ok.connect("clicked", ok_clicked)
|