Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : apps/euphoria

Dir     : e17/apps/euphoria/lib


Modified Files:
        playlist.rb playlist_item.rb 


Log Message:
added a 'selected' state to PlaylistItem that's controlled by the 
playlist_item.selected signal. The 'playlist_item.remove' signal makes the 
playlist remove selected entries
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/lib/playlist.rb,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- playlist.rb 22 May 2005 20:48:33 -0000      1.21
+++ playlist.rb 28 May 2005 20:13:33 -0000      1.22
@@ -1,4 +1,4 @@
-# $Id: playlist.rb,v 1.21 2005/05/22 20:48:33 tsauerbeck Exp $
+# $Id: playlist.rb,v 1.22 2005/05/28 20:13:33 tsauerbeck Exp $
 
 require "euphoria/playlist_item"
 
@@ -106,6 +106,12 @@
                        end
                end
 
+               @edje.on_signal("playlist_item.remove") do
+                       find_all { |i| i.selected }.each do |i|
+                               @xmms.playlist_remove(i.position)
+                       end
+               end
+
                each { |i| i.show(eet) }
 
                current_item && current_item.hilight
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/lib/playlist_item.rb,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- playlist_item.rb    28 May 2005 20:02:01 -0000      1.12
+++ playlist_item.rb    28 May 2005 20:13:33 -0000      1.13
@@ -1,7 +1,7 @@
-# $Id: playlist_item.rb,v 1.12 2005/05/28 20:02:01 tsauerbeck Exp $
+# $Id: playlist_item.rb,v 1.13 2005/05/28 20:13:33 tsauerbeck Exp $
 
 class PlaylistItem
-       attr_reader :id, :edje, :position
+       attr_reader :id, :edje, :position, :selected
 
        def initialize(id, xmms, playlist)
                @id = id
@@ -12,6 +12,7 @@
 
                @edje = nil
                @height = 0
+               @selected = false
 
                @props = {}
 
@@ -53,6 +54,10 @@
                        end
                end
 
+               @edje.on_signal("playlist_item.selected") do
+                       @selected = [EMAIL PROTECTED]
+               end
+
                @edje.on_signal("playlist_item.play") do
                        @xmms.playlist_set_next(@position).wait
                        @xmms.playback_tickle.wait




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to