X-Git-Url: http://git.code-monkey.de/?p=euphoria.git;a=blobdiff_plain;f=lib%2Fplaylist.rb;h=d1fe2ff8bafbdcf8c13e96db1221627b829f7870;hp=0df6ff162ead0d094cf749bacc1326b22cd79998;hb=99062e9e19c33dc97601a86e0b23c9a10a5d05fd;hpb=07bd2ad097ccf77fbe0a6679c2335e906f48866a diff --git a/lib/playlist.rb b/lib/playlist.rb index 0df6ff1..d1fe2ff 100644 --- a/lib/playlist.rb +++ b/lib/playlist.rb @@ -12,12 +12,14 @@ class Playlist < Array @eet = nil @container = nil - @xmms.playlist_list.notifier { |res| push(*res.value) } + @xmms.playlist.entries.notifier { |res| push(*res.value) } - begin - @current_pos = @xmms.playlist_current_pos.wait.value - rescue Xmms::Result::ValueError - @current_pos = nil + @xmms.playlist.current_pos.notifier do |res| + begin + @current_pos = res.value + rescue Xmms::Result::ValueError + @current_pos = nil + end end @xmms.broadcast_playlist_current_pos.notifier do |res| @@ -31,13 +33,13 @@ class Playlist < Array @xmms.broadcast_playlist_changed.notifier do |res| case res.value[:type] - when Xmms::Result::PLAYLIST_CHANGED_ADD + when Xmms::Playlist::ADD self << res.value[:id] - when Xmms::Result::PLAYLIST_CHANGED_REMOVE + when Xmms::Playlist::REMOVE # the daemon sends the position of the song, not the # unique mlib id delete(self[res.value[:position]]) - when Xmms::Result::PLAYLIST_CHANGED_CLEAR + when Xmms::Playlist::CLEAR clear end end @@ -157,6 +159,7 @@ class Playlist < Array @ee = Ecore::Evas::SoftwareX11.new @ee.title = "Euphoria Playlist" @ee.borderless = true + @ee.evas.font_hinting = Evas::Evas::AUTO @ee.on_pre_render { Edje::thaw } @ee.on_post_render { Edje::freeze }