gmusicbrowser Forum

Main board => Questions => Topic started by: mgrubert on November 21, 2011, 03:00:20

Title: How could I show the # of songs in the Queue ?
Post by: mgrubert on November 21, 2011, 03:00:20
I know TabListe widget can show the number of songs in the Queue in the title tab.
I would like to show this number somewhere in the layout.
Do you know how ?
Title: Re:How could I show the # of songs in the Queue ?
Post by: Quentin Sculo on November 23, 2011, 03:26:50
Not possible currently, sorry.
Where would you like to show this ?
Title: Re: How could I show the # of songs in the Queue ?
Post by: mgrubert on November 23, 2011, 11:44:36
An indicator, in top status bar or in bottom statut bar. I discover "Queue" button which is cool, but you need the tip to show # in queue.
I try a shimmer-laptop-NB-tab-queue with Hsize=Vsize=0 (just to have the title tab "Queue (%n)") but scrolling bar stay shown and it's awfull.
I try a Tittle(group=3,markup="%n") where group3 is the queuepane, but it doesn't work.
What is the perl/gmb function for knowing number in queue ?
Title: Re: How could I show the # of songs in the Queue ?
Post by: Quentin Sculo on November 25, 2011, 02:26:30
Quote
I try a shimmer-laptop-NB-tab-queue with Hsize=Vsize=0 (just to have the title tab "Queue (%n)") but scrolling bar stay shown and it's awfull.
That would be a really horrible hack  :o

Quote
What is the perl/gmb function for knowing number in queue ?
scalar(@$::Queue)
scalar is to force the scalar context, an array in scalar context returns the number of items in the array.
not sure where you want to use that though.
If you're ready to modify the source, take a look at the "Pos" widget in gmusicbrowser_layout.pm  it displays the number of songs in the queue when the queue is not empty, else the number of songs/position in the playlist. I can easily be forked into a widget that only shows the number of songs in the queue.
Title: Re: How could I show the # of songs in the Queue ?
Post by: mgrubert on November 25, 2011, 03:28:55
Nice ! Pos would rock for me !