349 - bluefunkyness
I’ve made a few improvements to the UI of bluefunk. You can see them in the new screenshot to your right.
The control buttons now have images as I worked out how to do it. In Gtk this is a little long winded, again because of the flexibility of the toolkit. You can basically put anything you like onto a button. This means that you have to build the image/label combination yourself, put it into another widget — because the button can only have one widget inside it — and then tell the button to display that widget. A little non-intuitive to say the least!
I have also worked out enough about the treeview control and model to put a little chevron by the currently playing track, which I think is quite nifty. I haven’t quite worked out how to pack a picture into the model and the appropriate cell renderer to draw a picture into the treeview. When that is done I just have to find the little speaker picture that Gnome apps display next to the currently playing track and I can have a funky now-playing picture just like the cool kids have.
I’ve also added a menu bar, though at the moment I haven’t decided whether to keep it.
One of the next tasks I have is working out how to use locking properly in C#. I currently have several threading bugs with the play code. The most noticeable is one that occurs when you click the Skip button too fast: the shared Process object that loads mpg123 becomes very confused indeed because it is being changed by many threads at once!
I also want to clean up the UI. It is looking pretty messy right now because I’ve just been trying to fit the buttons and stuff into the window. Now the functionality I want (for now) is in, I can work a little on sprucing up the UI.
I think I’m going to either wait for or hack on the GStreamer C# bindings before doing much on a library function and related stuff. This is because GStreamer can play lots of different formats, and also read the tag information from files for me. Using GStreamer would therefore save much time — and be much simpler in code — than for me to find the libraries for each format myself. I might add multiple playlists in the meantime, if I can work out a nice way to implement them.
For now I’m quite happy with how the coding is going. I’ve got quite a nice little player that I can use. My to-do list is as follows:
- Fix threading bugs
- Clean up UI
- Add features to manage the files on disk, such as delete and move files
- Multiple playlist support. This is something I’d like to have going when I have library support and tag reading.
- Fix other bugs!