projects
/
euphoria.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
99062e9
)
Handle broadcast_playlist_loaded.
master
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 24 Dec 2007 20:53:00 +0000
(21:53 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Mon, 24 Dec 2007 20:53:00 +0000
(21:53 +0100)
lib/playlist.rb
patch
|
blob
|
history
diff --git
a/lib/playlist.rb
b/lib/playlist.rb
index d1fe2ff8bafbdcf8c13e96db1221627b829f7870..9406a5b52ccb7734167a2bf9e8a554aa7a2df58b 100644
(file)
--- a/
lib/playlist.rb
+++ b/
lib/playlist.rb
@@
-12,7
+12,7
@@
class Playlist < Array
@eet = nil
@container = nil
@eet = nil
@container = nil
- @xmms.playlist.entries.notifier { |res| push(*res.value) }
+ query_contents
@xmms.playlist.current_pos.notifier do |res|
begin
@xmms.playlist.current_pos.notifier do |res|
begin
@@
-31,6
+31,9
@@
class Playlist < Array
current_item.hilighted = true
end
current_item.hilighted = true
end
+ @xmms.broadcast_playlist_loaded.
+ notifier(&method(:on_playlist_loaded))
+
@xmms.broadcast_playlist_changed.notifier do |res|
case res.value[:type]
when Xmms::Playlist::ADD
@xmms.broadcast_playlist_changed.notifier do |res|
case res.value[:type]
when Xmms::Playlist::ADD
@@
-192,4
+195,15
@@
class Playlist < Array
@ee.shaped = !@edje.data("shaped").nil?
end
@ee.shaped = !@edje.data("shaped").nil?
end
+
+ def query_contents
+ @xmms.playlist.entries.notifier do |res|
+ push(*res.value)
+ end
+ end
+
+ def on_playlist_loaded(res)
+ clear
+ query_contents
+ end
end
end