gmusicbrowser Forum

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

Title: How could I show the # of songs in the Queue ?
Post by: mgrubert on November 20, 2011, 22: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 22, 2011, 22: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, 06: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 24, 2011, 21:26:30
QuoteI 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

QuoteWhat 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 24, 2011, 22:28:55
Nice ! Pos would rock for me !