Author Topic: Layout Help, Mark-up in Buttons?  (Read 2737 times)

schueyFM

  • Newbie
  • *
  • Posts: 4
    • View Profile
Layout Help, Mark-up in Buttons?
« on: October 22, 2012, 19:20:08 »
I'm currently working on a layout to mimic nautilus 3.6 (just for consistency and a bit of fun) and was wondering if it were possible to add mark-up text to button labels (as per attached image).

Also, is it possible to have an onclick event where pressing a button will show a specific Artist / Album in the SongList, like would if it had been selected from a filter pane.

Thanks.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Layout Help, Mark-up in Buttons?
« Reply #1 on: October 23, 2012, 01:20:42 »
Quote
I'm currently working on a layout to mimic nautilus 3.6 (just for consistency and a bit of fun) and was wondering if it were possible to add mark-up text to button labels (as per attached image).
I thought it was possible, but no. I've added that, I'll make the commit tomorrow.

Quote
Also, is it possible to have an onclick event where pressing a button will show a specific Artist / Album in the SongList, like would if it had been selected from a filter pane.
Not currently, but it's planned
In the meantime I can give you an unsupported command to do that, but it only works on the main songlist of the main window, as currently finding the right group of a given songlist is not straightforward.
Code: [Select]
Button0(text=click me, activate="RunPerlCode ::SetFilter($::MainWindow,Filter->new_from_smartstring(q(album='exact case-sensitive Name of album')));");Instead of  album='exact case-sensitive Name of album' you can use album:'some substring' or anything that works in gmb's search bar


schueyFM

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Layout Help, Mark-up in Buttons?
« Reply #2 on: October 23, 2012, 03:29:07 »
Again, Thank you for quick response.  If we ever meet first beer is on me  :).

What I'm going for would be something like this.

Code: [Select]
Button1(label="%l", relief=normal, activate="RunPerlCode ::SetFilter($::MainWindow,Filter->new_from_smartstring(q(album='%l')));")
Thanks again.