Enlightenment CVS committal Author : tsauerbeck Project : e17 Module : apps/euphoria
Dir : e17/apps/euphoria/lib Modified Files: playlist.rb Log Message: tell the main window/app about playlist item updates =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/euphoria/lib/playlist.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- playlist.rb 27 Apr 2005 20:09:17 -0000 1.8 +++ playlist.rb 27 Apr 2005 20:28:33 -0000 1.9 @@ -1,12 +1,13 @@ -# $Id: playlist.rb,v 1.8 2005/04/27 20:09:17 tsauerbeck Exp $ +# $Id: playlist.rb,v 1.9 2005/04/27 20:28:33 tsauerbeck Exp $ require "euphoria/playlist_item" class Playlist < Array - def initialize(xmms) + def initialize(xmms, on_cur_item_changed) super() @xmms = xmms + @on_cur_item_changed = on_cur_item_changed @ee = nil @eet = nil @container = nil @@ -44,6 +45,10 @@ props = res.value find_all { |i| i.id == props[:id] }.each do |item| item.properties = props + + if current_item && current_item.id == item.id + @on_cur_item_changed.call(item) + end end end end ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs