Author Topic: How could I show the # of songs in the Queue ?  (Read 3179 times)

mgrubert

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
How could I show the # of songs in the Queue ?
« 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 ?

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1100
    • View Profile
Re:How could I show the # of songs in the Queue ?
« Reply #1 on: November 23, 2011, 03:26:50 »
Not possible currently, sorry.
Where would you like to show this ?

mgrubert

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
Re: How could I show the # of songs in the Queue ?
« Reply #2 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 ?

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1100
    • View Profile
Re: How could I show the # of songs in the Queue ?
« Reply #3 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.

mgrubert

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
Re: How could I show the # of songs in the Queue ?
« Reply #4 on: November 25, 2011, 03:28:55 »
Nice ! Pos would rock for me !