Thanks...  You should have enough info between squentins and mine to see the differences and create your own or edit it to your liking...

Good Luck

That white triangle is from a Gnome 3 issue that I recall from using Gnome Shell on Fedora 15..  There is a fix for it ...  Has to do with a corner move settings hat you can tweak.  I think I may have even discussed it with squentin on these forums somewhere

Quentin & VastOne,

Again, many thanks for your help on the widget.

After spending considerable time reading the layout wiki (I won't divulge how long  :-X :-[) and experimenting with code splicing of your respective versions, I've gotten this far:

[nowplaying_timeslider_rizlaw]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) -HBtime Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBtime= Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)


I've attached a snapshot of what it looks like (minus the popup buttons which appear over the bottom text area when the cover art is moused over).

I still can't figure out how to get the timeslider above the text and below the cover art.

Also, VastOne, you mentioned:

QuoteThat white triangle is from a Gnome 3 issue that I recall from using Gnome Shell on Fedora 15..  There is a fix for it ...  Has to do with a corner move settings hat you can tweak.  I think I may have even discussed it with squentin on these forums somewhere

I did a search but couldn't find any post in the forum about it. I'm using Ubuntu 11.10 Unity and Gnome Shell. Is it possible for you to be more specific on how to fix the white triangle issue?

This edit puts the timeslider on top

[nowplaying_timeslider_rizlaw]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBtime _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup)  Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBtime= Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)


As far as the triangle, I cannot be more specific with the fix since I quit using it... I do not recall if I ever did fix it, although I do recall reading about a fix, either on the Ubuntu Forums or The Fedora Forums

I apologize, I cannot be any more specific than that

VastOne,

That simple a change. :-[
No need to apologize, thanks again.
Will go surfing Ubuntu Forums to see if I can find an answer.

edit: made the change. Actually, it works out better this way. Now the timeslider is above the cover art with no nasty white triangle obscuring the time played.

Just wanted to show you my final tweaks on this..  I found this way allows the popup buttons to be on their own at the bottom without ever floating over anything - Of course you do not see them in this image



[nowplaying_screenlet2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) HBTime _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup)
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)

[nowplaying_screenlet_vastone2]
Type=D
DefaultFont=8
Window        = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) -HBTime
HBTime        = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeBar(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)


I will try it out, although I do prefer the text at the bottom.

Am I correct in assuming that because of this piece of Quentin's code in the nowplaying_screenlet2 layout:
hover_layout=nowplaying_screenlet2_popup

that, both my version of the layout and Quentin' need to be in the GMB layout folder simultaneously for the popup buttons to work?


Yes ... that code needs to be there... But you can combine them all into one file, which is what I did here

This does not have squentins in it but it does have yours and mine...

file name is screenslets.layout and it is in /home/myusername/.config/gmusicbrowser/layouts

[nowplaying_screenlet2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) HBTime _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup)
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)

[nowplaying_screenlet_vastone2]
Type=D
DefaultFont=8
Window        = size=240x240,transparent=1
VBmain= Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup) -HBTime
HBTime        = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeBar(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)


[nowplaying_screenlet2_popup]
Window = transparent=1
HBmain= 12Prev 12Play 12Next 12BMSettings 12VolumeIcon
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")
VolumeScroll = VolumeIcon

[nowplaying_screenlet3]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBbuttons = Prev Stop Play Next

[nowplaying_screenlet4]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= ABbuttons _Cover(forceratio=1) TimeBar Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
ABbuttons= (xalign=.5,xscale=0) HBbuttons
HBbuttons = Prev Stop Play -Next

[nowplaying_timeslider_rizlaw]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= HBtime _Cover(forceratio=1,hover_delay=1,hover_layout=nowplaying_screenlet2_popup)  Title(xalign=.5) Artist(xalign=.5) Album(xalign=.5)
HBtime= Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)

I really like what you did. A big improvement, particularly the popup buttons. It will become my default.

So if I understand correctly, the "combined" layout code in the above post means that this is the only layout file that needs to be in the layout config folder.

Yes, this is all I have in my layouts folder...  And if you or squentin were to add additional layouts or changes, I would just add them to this file

Thanks BTW, I am glad you like it

About the resize triangle, it comes from ubuntu specific changes to gtk, it's deactivable globally by editing your gtkrc or something like that : http://forum.gmusicbrowser.org/index.php?topic=428.msg1987#msg1987 (in french but there is a link to an english page)

About the 44100/48000 pulseaudio problem, I remembered reading something about it, that might interest you :
http://arunraghavan.net/2011/10/alternate-sample-rates/

About alsa playing multiple streams, it uses dmix it seems, which will resample everything to one given rate :
http://alsa.opensrc.org/Dmix#Does_dmix_affect_sound_quality.3F

I guess one possibility is using 2 different inputs if your sound card has more than 1, or 2 sound cards/chip, one would be reserved for a single music stream, the other for skype/other. But I don't know much about soundcards.

QuoteThe time playing bar is fine, but I just had a thought - could you include the numeric time "time remaining/total time"  within the time playing bar in small, but visible type? "Time remaining" on far left of bar and "Total time" on far right.
The TimeBar widget can include text, like this : TimeBar(text="$current/$left")
But you can't control the text position. available variables are $percent $current $left $total, in addition to the usual variables like $tiltle and %t

Finally, about the popup layout, I started implementing an option that lets you choose where the popup should be positioned above its widget. I just have to make my mind up on the syntax of the option

Thanks for all the info and help Quentin.

Have you looked at the latest code VastOne has submitted which is combined with your code. For now, IMO, it looks like the best visual solution.

By the way, I used Nautilus to delete all the layout files I added to my layout config folder during our experimentation in creating the nowplaying widget, however the deleted layout filenames are still present within GMB's Desktop Widgets control panel list. I've restarted GMB several times and even rebooted, but the old layout filenames won't go away. How do I get rid of them since they are no longer active or needed?

Did you remove them from within the GMB Desktop Widget too?

QuoteI've restarted GMB several times and even rebooted, but the old layout filenames won't go away. How do I get rid of them since they are no longer active or needed?
That's a bug, I'll fix it so that the button to remove the selected widget is shown even if the layout is unknown

Quentin..  Thanks for all the explanations and code!!!!