libsaria: Do filtering through sources
This allows me to set filter text and trigger a callback.
This commit is contained in:
parent
ac0f23ab80
commit
3f8cba6f16
|
@ -44,3 +44,8 @@ def library_updated():
|
|||
on_queue_changed = null_cb
|
||||
def queue_changed():
|
||||
on_queue_changed()
|
||||
|
||||
on_filter = null_cb
|
||||
def refilter():
|
||||
print "filtering..."
|
||||
on_refilter()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Bryan Schumaker (8/8/2010)
|
||||
|
||||
import libsaria
|
||||
from libsaria import callbacks
|
||||
exists = libsaria.path.exists
|
||||
expand = libsaria.path.expand
|
||||
|
||||
|
@ -41,6 +42,10 @@ def get_attrs(*attrs):
|
|||
return library.get_attrs(cur_id, *attrs)
|
||||
return -1
|
||||
|
||||
def filter(text):
|
||||
library.filter(text)
|
||||
callbacks.refilter()
|
||||
|
||||
def is_visible(id):
|
||||
return library.is_visible(id)
|
||||
|
||||
|
|
Loading…
Reference in New Issue