Mélodie improvements
Updated 1 year, 8 months ago
| Truls Becken | Reviewers | ||
| EtoileCore | |||
| None | Etoile trunk (etoile/trunk/Etoile) | ||
- Cache the play/pause icons rather than calling out to IconKit once per second. - Detect when a new song is playing by comparing the identities of URLs from MediaKit. - Use the MediaKit queue size to know which ETMusicFile is current. - Update the song label when the URL changes (previously on double-click only). - Keep the MediaKit queue at a couple of songs rather than pushing everything at once. - Implement the previous button using ETHistoryManager. - Disable the next/previous buttons when appropriate, and make them appear dimmed (Thanks Quentin) - Fire the UI update timer after actions that are likely to require a refresh. Although there's no reason for it to block this commit, I'll be the first to say that I don't think Mélodie should be using a history manager for the songs played. It depends a little, but the more natural approach is probably to use the playlist. This, however, must be seen in a slightly larger context. What should happen when one clicks on a song in the main list? If Mélodie is going to be playlist driven, it should just add the song at the end of the playlist. This also makes things less confusing when one keeps changing the main list through searching. Also, I think the MusicPlayerController should not be concered with items from EtoileUI, but rather ETMusicFile objects directly. I might look into this a little more since it's a good opportunity for learning about CoreObject.
Posted 1 year, 8 months ago (December 15th, 2008, 2:02 p.m.)
Looks good to me, but Eric's the Mélodie maintainer, so wait for him to check it before committing.
-
Services/User/Melodie/MusicPlayerController.st (Diff revision 2) -
Smalltalk code should use +new, not +alloc/-init, unless you want to create memory leaks.