Author Topic: Help customizing stock layouts  (Read 6026 times)

strungoutfan78

  • Newbie
  • *
  • Posts: 4
    • View Profile
Help customizing stock layouts
« on: December 08, 2011, 02:49:54 »
I'm running Debian Squeeze.  Can anyone tell me where I can find the layout files that ship with gmusicbrowser by default?  I can't find them anywhere.  What I'm trying to do is simply reduce the width of the playlist in order to allow the album pane to extend all the way from top to bottom.  In other words I want the Genre and Artist panels to sit above the playlist and the playlist should never be wider than the Artist and genre panels combined, with artist, genre, and playlist resizing horizontally  together.  I've hacked around on some other layouts and have a pretty slick fullscreen layout now, but the terminology for these layouts is so cryptic I can't understand it even after reading the documentation a million times.  Plus I just can't find them.  The base layout I'm starting with is "iTunes-like"  See the attachment.  Thanks!

mgrubert

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
Re : Help customizing stock layouts
« Reply #1 on: December 08, 2011, 10:53:31 »
No time today, but try to look on the layout posted in the forum recently : the layouts' creators often friendly organise the code to make it understand-able.
Look at mine for instance in this thread : http://forum.gmusicbrowser.org/index.php?topic=515.0
« Last Edit: December 08, 2011, 22:18:11 by mgrubert »

mgrubert

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
Re : Help customizing stock layouts
« Reply #2 on: December 08, 2011, 22:13:27 »
Your layout is joined.

Embedded layout are in /usr/share/gmusicbrowser/layout file in your version (stable version I guess) and in /usr/share/gmusicbrowser/layouts/ folder in 1.1.7+ versions
Put the joined file in ~/.config/gmusicbrowser/layout/ (create folders if they don't exist) and it should appear in the settings (perhaps it only works in 1.1.7+ versions, if it doesn't copy the layout code in  /usr/share/gmusicbrowser/layout file or created in ~/.config/gmusicbrowser/ a file named layout and put the code in)

HP and VP are for resizable panel but they only can contain 2 panels
HB and VB are not resizable but they can contain as panels as you want

I make your layout with only HP and VP so you can resize each panel.

I take ituneslike layout and change the bottom filters


Queue still hidable/showable in the bottom (menu)
Right panel is removable (menu)
If you don't want those options change :
Code: [Select]
MBmenu = MainMenuItem PSortItem PFilterItem QueueItem SMView
    SMView = (label=_"View") MenuItem2(togglewidget=FPane3,label=_"Right pane") MenuItem3(togglewidget=VPlists,label=_"Queue")
in
Code: [Select]
MBmenu = MainMenuItem PSortItem PFilterItem QueueItem
And remove too the Queue panel. Change :
Code: [Select]
VBlist = HBstatus _SongList _VPlists
    HBstatus = SimpleSearch MBlist Refresh ResetFilter PlayFilter -Total
     MBlist = HistItem LSortItem PlayItem
    VPlists = QueueList(group=2)
in
Code: [Select]
VBlist = HBstatus _SongList
    HBstatus = SimpleSearch MBlist Refresh ResetFilter PlayFilter -Total
     MBlist = HistItem LSortItem PlayItem
and delete "hidden=VPlists"

Bye
« Last Edit: December 08, 2011, 22:36:18 by mgrubert »

strungoutfan78

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Help customizing stock layouts
« Reply #3 on: December 08, 2011, 23:44:06 »
wow thanks mgrubert.  Seeing what you've done here helps explain things a little.  Thanks you for showing me where the layouts were located.  I had found /usr/share/gmusicbrowser/layouts but thought it was a directory.  I didn't realize that all the layout are specified in one file.

I really like what you've done here.  The only problem is now that everything is set up in the right place the artist pane (FBPane2 I think) is completely blank.  I'm looking at the files and trying to figure out exactly what happened.  I'm just going to keep trying but in case you feel like helping me out a little further here's a screenshot of how it looks now.

Oh and thanks for your help.

mgrubert

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
Re: Help customizing stock layouts
« Reply #4 on: December 08, 2011, 23:52:53 »
There could be a lot of reason.
Join your layout tweaked and I'll take a look.
You can ask me some tweak too.

strungoutfan78

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Help customizing stock layouts
« Reply #5 on: December 09, 2011, 02:36:45 »
The code in question is:
Code: [Select]
## Left filter
 VPLeft = _HPGenreAndArtist _VBlist
  HPGenreAndArtist = _FPane1(nb=1,hidebb=1,hidetabs=1,page=genre,pages=genre) _FPane2(nb=2,hidebb=1,hidetabs=1,page=artists,pages=artists)
  VBlist = HBstatus _SongList
    HBstatus = SimpleSearch MBlist Refresh ResetFilter PlayFilter -Total
     MBlist = HistItem LSortItem PlayItem

The section it is relevant to in the original /usr/share/gmusicbrowser/layouts is here (I think):
Code: [Select]
HPfp0 = FPane0(nb=2,hide=1,pages=genre) HPfp1
HPfp1 = FPane1(nb=3,hide=1,pages=artist) FPane2(nb=4,hide=1,pages=album)

You added a few things in the FPanels such as hidebb, page, and hidetabs.  I'm not sure what those do.  You also changed the value assigned to nb in each panel.  Not sure what that does either.  I've changed all of these but nothing seems to help.  Sorry for being so thick-headed.

strungoutfan78

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re : Help customizing stock layouts
« Reply #6 on: December 09, 2011, 12:54:15 »
OK I figured it out.  Took me a while.  Apparently the portion which reads:
Code: [Select]
page=artists,pages=artists
should actually read:
Code: [Select]
page=[b]artist[/b],pages=[b]artist[/b]
Just one extra letter, lol.  Syntax can be a bitch if one is not familiar with the terminology.

Anyway, see the photo.  Everything looks exactly the way I want it now.  Thank you so much for all your help.

I'd like to post this somewhere so that others may use it if they wish if that's alright with you.
« Last Edit: December 09, 2011, 12:57:42 by strungoutfan78 »

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Help customizing stock layouts
« Reply #7 on: December 10, 2011, 03:31:08 »
putting pages=artists instead of pages=artist should work too, it will just list artists using the splitting rules and the title extraction rule that can be found in the misc tab of the settings. There was probably another small difference, the syntax is a bit sensitive, when you are editing layouts you should launch gmb from a terminal as some layout errors are printed in the terminal.

btw, the page= option (that sets the default page) is not needed if the FilterPane has only one page.

A few answer/comments :

The hidebb option is to hide the button bar at the bottom of the FilterPane.
The hidetabs option is to hide the tabs, though that is the default if the FilterPane has only one tab.

All these options (page/pages/hidebb/hidetabs) are user-settable and so only affect new FilterPanes else the saved state is used.

The nb option is to select the "filter level" to get the "cascading" behavior of FilterPanes, for example with an album FilterPane of nb=n it will display albums present in the in the sum of the filters <n and when selecting an album it will set the filter level n and reset filters of level >n


mgrubert

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
Re : Re : Help customizing stock layouts
« Reply #8 on: December 10, 2011, 05:00:21 »
Code: [Select]
page=artists,pages=artistsIn a Filterpane :
Page= default tab of there are more than one tab
Pages = tab loaded
For instance : page=artist,pages=artist|album|genre
means : three tabs are loaded : artist, album, genre and the default tab is artist

(just the first time, if you add tab, remove, etc, gmusicbrowser record your changes in ~/.config/gmusicbrowser/gmbrc and all of these parameters will be forgotten)