Enlightenment CVS committal Author : tsauerbeck Project : e17 Module : apps/euphoria
Dir : e17/apps/euphoria/lib Modified Files: playlist.rb Log Message: theme compat work =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/euphoria/lib/playlist.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- playlist.rb 27 Apr 2005 20:38:15 -0000 1.10 +++ playlist.rb 28 Apr 2005 08:17:45 -0000 1.11 @@ -1,4 +1,4 @@ -# $Id: playlist.rb,v 1.10 2005/04/27 20:38:15 tsauerbeck Exp $ +# $Id: playlist.rb,v 1.11 2005/04/28 08:17:45 tsauerbeck Exp $ require "euphoria/playlist_item" @@ -58,46 +58,19 @@ @current_pos && [EMAIL PROTECTED] end - def show(eet) + def show(eet, is_separate) return unless @ee.nil? @eet = eet - @ee = Ecore::Evas::SoftwareX11.new - @ee.title = "Euphoria Playlist" - @ee.borderless = true - - @ee.on_pre_render { Edje::thaw } - @ee.on_post_render { Edje::freeze } - - @ee.on_resize do - x, y, w, h = @ee.geometry - @edje.resize(w, h) - @dragger.resize(w, h) + if is_separate + setup_ee + else + @ee = Euphoria.instance.ee + @edje = Euphoria.instance.edje end - @dragger = Esmart::Draggies.new(@ee) - @dragger.name = "dragger" - @dragger.button = 1 - @dragger.show - - @edje = Edje::Edje.new(@ee.evas) - @edje.load(eet, "playlist") - @edje.name = "edje" - @edje.show - - w, h = @edje.get_size_max - @ee.set_size_max(w, h) - - w, h = @edje.get_size_min - @ee.set_size_min(w, h) - - @ee.resize(w, h) - @ee.show - - @ee.shaped = [EMAIL PROTECTED]("shaped").nil? - - @container = Esmart::Container.new(@ee.evas) + @container = Esmart::Container.new(@edje.evas) @container.name = "playlist" @container.direction = Esmart::Container::VERTICAL @container.spacing = 0 @@ -106,14 +79,16 @@ @edje.part("playlist.container").swallow(@container) - @edje.on_signal("close") do - each { |i| i.hide } - - @edje = nil - @container = nil - @dragger = nil - @ee.delete - @ee = nil + if is_separate + @edje.on_signal("close") do + each { |i| i.hide } + + @edje = nil + @container = nil + @dragger = nil + @ee.delete + @ee = nil + end end @edje.on_signal("drag", "playlist.scrollbar.handle") do @@ -155,4 +130,42 @@ each { |i| i.hide if i.visible? } super end + + private + def setup_ee + @ee = Ecore::Evas::SoftwareX11.new + @ee.title = "Euphoria Playlist" + @ee.borderless = true + + @ee.on_pre_render { Edje::thaw } + @ee.on_post_render { Edje::freeze } + + @ee.on_resize do + x, y, w, h = @ee.geometry + + @edje.resize(w, h) + @dragger.resize(w, h) + end + + @dragger = Esmart::Draggies.new(@ee) + @dragger.name = "dragger" + @dragger.button = 1 + @dragger.show + + @edje = Edje::Edje.new(@ee.evas) + @edje.load(@eet, "playlist") + @edje.name = "edje" + @edje.show + + w, h = @edje.get_size_max + @ee.set_size_max(w, h) + + w, h = @edje.get_size_min + @ee.set_size_min(w, h) + + @ee.resize(w, h) + @ee.show + + @ee.shaped = [EMAIL PROTECTED]("shaped").nil? + 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