Implementing the PlaybackPopover on Music

Hey everyone!

In the last post, I told that I was working on static version of PlaylistPopover (which now I’ll call PlaybackPopover or PlaybackBuffer since it doesn’t show just playlists that you create).

Now, I finally started to work on Music base code, although I’m still using the static version for testing and such.

First of all, I needed to study and figure out how to catch the current playback to print that in the console. I got this information in Player.playlist, and after worked the data I was able to do that.

Then, I needed attach my static script on gnome-music.

To do that, I was able to use the UI file that I had done for static version, just making a small changes (like changing ID names).

In the python part, I needed to rewrite almost all the code to adapt to gnome-music (although the logic be the same). So, I could print the current playback in the new Music popover and no longer on the console.

This is a first screenshot of PlaybackBuffer on Music:
ScreenshotMusic

I created a new github repository which is separated from the static script (which link I posted on the last post) to work with gnome-music freely.

As I also mentioned in the last post, I have some difficulties to implement a Gtk.ListBox with a model. The documentation is not clear enough and I didn’t find any examples of implementation.

My mentor was working in a personal project which uses Gtk.ListBox with model. He sent me an example and discussed with me. That helped me to understand better how to implement it, succeeding this time.

Since I had these difficulties, I have decided to do a little tutorial to help someone who also has difficulties with it.

I’ll post that and I also will post an example on GNOME Developer Platform Demos.

It has been very gratifying to work with gnome-music and to see my work taking shape.

Now, I’m implementing a Gtk.Stack which will select between these tree popover layouts according the view selected by the user.

But this is subject to the next post! 😉

I see you there!

One thought on “Implementing the PlaybackPopover on Music

Leave a Reply

Your email address will not be published. Required fields are marked *