Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : apps/euphoria

Dir     : e17/apps/euphoria/lib


Modified Files:
        playlist.rb playlist_item.rb 


Log Message:
select the first item in the playlist automatically
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/lib/playlist.rb,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- playlist.rb 28 May 2005 20:13:33 -0000      1.22
+++ playlist.rb 28 May 2005 21:06:36 -0000      1.23
@@ -1,4 +1,4 @@
-# $Id: playlist.rb,v 1.22 2005/05/28 20:13:33 tsauerbeck Exp $
+# $Id: playlist.rb,v 1.23 2005/05/28 21:06:36 tsauerbeck Exp $
 
 require "euphoria/playlist_item"
 
@@ -127,6 +127,7 @@
                        super(item)
 
                        item.show(@eet) unless @container.nil?
+                       item.select if size == 1
                end
 
                self
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/euphoria/lib/playlist_item.rb,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- playlist_item.rb    28 May 2005 20:13:33 -0000      1.13
+++ playlist_item.rb    28 May 2005 21:06:36 -0000      1.14
@@ -1,4 +1,4 @@
-# $Id: playlist_item.rb,v 1.13 2005/05/28 20:13:33 tsauerbeck Exp $
+# $Id: playlist_item.rb,v 1.14 2005/05/28 21:06:36 tsauerbeck Exp $
 
 class PlaylistItem
        attr_reader :id, :edje, :position, :selected
@@ -41,6 +41,10 @@
 
                @playlist.container.append_element(@edje)
 
+               if @selected
+                       @edje.emit_signal("playlist_item.selected", "")
+               end
+
                # if a playlist item gets hilighted, un-hilight all other items
                # same for selected/unselected
                ["selected", "hilighted"].each do |state|
@@ -77,6 +81,14 @@
                @edje.emit_signal("playlist_item.hilighted", "") unless 
@edje.nil?
        end
 
+       def select
+               if @edje.nil?
+                       @selected = true
+               else
+                       @edje.emit_signal("playlist_item.selected", "")
+               end
+       end
+
        def visible?
                # since we don't actually hide the edje, but just delete it,
                # we don't need to check @edje.visible? here




-------------------------------------------------------
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