Media View Toggle Buttons

Tuesday, Feb 2. 2010  –  Category: Songbird

Picture 3One of the things implemented in Purple Rain (the new Feather in Songbird 1.4) was direct toggle buttons to select the current Media View.  However, we only implemented them for the built in List View & Filter View buttons.  Third party Media Views were still only listed in the arrow-drop-down menu button next to them.  I’m happy to say that we’ve landed bug 18538 on trunk yesterday which will allow Media View developers to create and define icons to represent their Media View.  They will be automatically inserted into the row of buttons to allow users to more easily switch to the available views.

All the Media View developer needs to do is create an icon file.  It must be 22×80, with all four 22×20 states (normal, hover, active, and disabled) vertically stacked in it.  Here’s a sample one I created for John M’s excellent Grid View:

mpIconAll that’s left is to point to it inside the Media View’s install.rdf file.  In the same <songbird:mediaPage> section we simply define a new <songbird:contentIcon> value, like so:

<songbird:mediaPage>
   <Description>
        <songbird:contentIcon>chrome://gridview/skin/mpIcon.png</songbird:contentIcon>
        <songbird:contentTitle>Grid View</songbird:contentTitle>
        <songbird:contentUrl>chrome://gridview/content/media-page.xul</songbird:contentUrl>
    </Description>
</songbird:mediaPage>

That’s all there is to it!

♪Photo

Thursday, Oct 23. 2008  –  Category: Songbird

I’ve been hacking on a new Media View for Songbird this week… partly as something fun to do since I’ve wrapped up mashTape, and partly as an excuse for me to play with Canvas.

Here’s a screenshot of my asian pop playlist that doesn’t have too many artists in it. Basically this is a way for me to visualise a playlist or library by artist and album images. It’s handy for me since I tend to recognise things spatially and visually… especially for international artists in languages I can’t read or speak (Chinese, Korean, and Japanese being great examples). For instance, I know that if I place my artist image for 伊藤由奈 in the top-right and scale it bigger than the rest (since I’ve been listening to her a lot lately), it’s easy for me to jump to her music quickly.

Of course this becomes less useful (but makes for a cooler screenshot!) when I do it with my entire library. :)

update:

I’ve uploaded my first prototype of the view to our add-ons site. Be warned, it could leak memory, and it takes a while to startup the first time you install it since it’s seeding the database, scanning your library, and making requests to Last.fm for artwork


Recent posts