gmusicbrowser Forum

Main board => Customization => Topic started by: shamen456 on May 08, 2010, 10:27:54

Title: NextAlbum Button
Post by: shamen456 on May 08, 2010, 10:27:54
I'de like to put a button to go to the next album (using the NextAlbum command)

Does anybody already have such a button in a layout?

Is it possible to post the code here?

Thank you in advance

This player is really astonishing and give a lot of new possibilities..
Title: Re: NextAlbum Button
Post by: Quentin Sculo on May 09, 2010, 01:16:19
You can simply use Next1(activate=NextAlbum)
(the 1 is to use a different name than an normal Next widget that your layout might be using, all widgets in a layout must have  distinct names)
of course, changing the icon would be nice, you can do that by putting the icon in ~/.config/gmusicbrowser/icons/gmb-nextalbum.png (or .svg) and using :
Next1(activate=NextAlbum,stock=gmb-nextalbum)

To create a layout with one, simply copy an existing layout, and add it, for example after a "Next" :
HBButtons1   = Prev Stop Play Next
=>
HBButtons1   = Prev Stop Play Next Next1(activate=NextAlbum,stock=gmb-nextalbum)

you can also change the Next widget to do NextAlbum when clicked with the middle button (=2) with :
Next(click2=NextAlbum)
Title: Re: NextAlbum Button
Post by: ochosi on May 09, 2010, 01:19:16
nice idea of adding that functionality to the Next button, immediately got implemented in my layout :)

ps: is there something like "PrevAlbum" too?
Title: Re: NextAlbum Button
Post by: Quentin Sculo on May 09, 2010, 01:50:48
Quote from: ochosi on May 09, 2010, 01:19:16
ps: is there something like "PrevAlbum" too?
not currently, it could be done