yeah, its something to do with codepages and unicode / utf8 conversion. it's crashing within scintialla, who's code I'm not familiar with so I'm not quite sure what's going on. I tried changing the codepage on my system to see if I could reproduce the crash but then vista refused to boot, which meant I had to reinstall :( does bringing up the scpl layout box ever cause a crash, or is it only the main panels ui settings dialog (the one with the formatting string).
Opening the SCPL setting dialog also crashes foobar. Again, if I change codepages it does not seem to crash. For the sake of experimentation here is the code I am currently using for the main panelsui config please let me know if there is a way I can code it to be more friendly with scintilla:
$drawrect(0,0,0,0,brushcolor-233-233-233 pencolor-null)
// Top Bar
$panel(Menu,Menu,0,0,250,20,)
$panel(Logo,Track Display,$sub(%_width%,55),0,55,20,)
// Top Panel
$puts(toppanel.numpanels,5)
$ifgreater($getpvar(toppanel.hide),0,
$button2($sub($div(%_width%,2),25),22,0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.hide:$ifgreater($getpvar(toppanel.hide),0,0,1),'TOOLTIP:Open Panel')
,
$drawrect($div(%_width%,3),160,1,5,brushcolor-0-0-0 pencolor-null)
$drawrect($sub(%_width%,$div(%_width%,3)),160,1,5,brushcolor-0-0-0 pencolor-null)
$button2($sub($div(%_width%,2),25),162,0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.hide:$ifgreater($getpvar(toppanel.hide),0,0,1),'TOOLTIP:Hide Panel')
$ifgreater($getpvar(toppanel.mode),0,
$button2(0,160,0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.mode:$ifgreater($getpvar(toppanel.mode),1,$sub($getpvar(toppanel.mode),1),0),TOOLTIP:'Previous Panel')
,)
$ifgreater($getpvar(toppanel.mode),$sub($get(toppanel.numpanels),2),,
$button2($sub(%_width%,$div(%_width%,3)),160,0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.mode:$ifgreater($getpvar(toppanel.mode),$sub($get(toppanel.numpanels),2),$sub($get(toppanel.numpanels),1),$add($getpvar(toppanel.mode),1)),TOOLTIP:'Next Panel')
)
$select($add($getpvar(toppanel.mode),1),
$panel(Now Playing,Track Display,5,20,$sub(%_width%,10),140,)
,
$panel(Albums,Album list,0,20,%_width%,140,)
,
$panel(Queue,Queue Manager,0,20,%_width%,140,)
,
$panel(Lyrics,Lyric Show,0,20,%_width%,140,)
,
$panel(Console,Console,0,20,%_width%,140,)
)
)
$puts(mainpanel.y,$add(20,$ifgreater($getpvar(toppanel.hide),0,5,145)))
$puts(mainpanel.height,$sub(%_height%,$add(50,$ifgreater($getpvar(toppanel.hide),0,5,145),$ifgreater($getpvar(bottompanel.hide),0,2,50))))
// Main Panel
$select($add($getpvar(mainpanel.mode),1),
$panel(Lists,Playlists Dropdown,0,$get(mainpanel.y),150,20,)
$panel(Order,Playback order,150,$get(mainpanel.y),120,20,)
$panel(Search,Quick Search Toolbar,270,$get(mainpanel.y),$sub(%_width%,320),20,)
$button2($sub(%_width%,42),$get(mainpanel.y),0,0,14,14,X,x,PVAR:SET:playlist.mode:0,)
$button2($sub(%_width%,28),$get(mainpanel.y),0,0,14,14,Y,y,PVAR:SET:playlist.mode:1,)
$button2($sub(%_width%,14),$get(mainpanel.y),0,0,14,14,Z,z,PVAR:SET:playlist.mode:2,)
$panel(Playlist,Single Column Playlist,0,$add($get(mainpanel.y),20),%_width%,$sub($get(mainpanel.height),20),)
,
$panel(ProjectM,ProjectM Visualisation,0,$get(mainpanel.y),%_width%,$get(mainpanel.height),)
,
$panel(Test,Track Display,0,$get(mainpanel.y),%_width%,$get(mainpanel.height),)
)
// Bottom Panel
$puts(bottompanel.y,$sub(%_height%,75))
$puts(bottompanel.height,45)
$puts(bottompanel.numpanels,3)
$puts(toolbox.icons,29)
$puts(toolbox.iconsize,34)
$puts(toolbox.max,$sub($mul($get(toolbox.icons),$get(toolbox.iconsize)),$ifgreater($sub(%_width%,50),0,$sub(%_width%,50),0)))
$puts(toolbox.step,$ifgreater($get(toolbox.max),$add($get(toolbox.offset),10),$add($get(toolbox.offset),10),$sub($get(toolbox.max),$get(toolbox.offset))))
$ifgreater($getpvar(bottompanel.hide),0,
$button2($sub($div(%_width%,2),25),$sub(%_height%,32),0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.hide:$ifgreater($getpvar(bottompanel.hide),0,0,1),'TOOLTIP:Open Panel')
,
$drawrect($div(%_width%,3),$sub(%_height%,80),1,5,brushcolor-0-0-0 pencolor-null)
$drawrect($sub(%_width%,$div(%_width%,3)),$sub(%_height%,80),1,5,brushcolor-0-0-0 pencolor-null)
$button2($sub($div(%_width%,2),25),$sub(%_height%,79),0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.hide:$ifgreater($getpvar(bottompanel.hide),0,0,1),'TOOLTIP:Hide Panel')
$ifgreater($getpvar(bottompanel.mode),0,
$button2(0,$sub(%_height%,80),0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.mode:$ifgreater($getpvar(bottompanel.mode),1,$sub($getpvar(bottompanel.mode),1),0),TOOLTIP:'Previous Panel')
,)
$ifgreater($getpvar(bottompanel.mode),$sub($get(bottompanel.numpanels),2),,
$button2($sub(%_width%,$div(%_width%,3)),$sub(%_height%,80),0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.mode:$ifgreater($getpvar(bottompanel.mode),$sub($get(bottompanel.numpanels),2),$sub($get(bottompanel.numpanels),1),$add($getpvar(bottompanel.mode),1)),TOOLTIP:'Next Panel')
)
$select($add($getpvar(bottompanel.mode),1),
$panel(Egoh,Egoh Spectrum analyser,5,$sub(%_height%,75),$sub(%_width%,10),45,)
,
// -- Toolbox Start -- //
$drawrect(7,$add($get(bottompanel.y),1),$sub(%_width%,14),$sub($get(bottompanel.height),1),brushcolor-null pencolor-0-0-0)
$drawrect(10,$add($get(bottompanel.y),3),$sub(%_width%,20),$sub($get(bottompanel.height),5),brushcolor-0-0-0 pencolor-null)
$button2(2,$add($get(bottompanel.y),13),0,0,20,20,'$imageabs2(20,20,,,,,,,/images\leokennis\prev.png,)','$imageabs2(20,20,,,,,,,/images\leokennis\prev_down.png,)',
PVAR:SET:toolbox.offset:$ifgreater($getpvar(toolbox.offset),0,$sub($getpvar(toolbox.offset),$get(toolbox.step)),0),)
$button2($sub(%_width%,22),$add($get(bottompanel.y),13),0,0,20,20,'$imageabs2(20,20,,,,,,,/images\leokennis\next.png,)','$imageabs2(20,20,,,,,,,/images\leokennis\next_down.png,)',
PVAR:SET:toolbox.offset:$ifgreater($getpvar(toolbox.offset),$sub($get(toolbox.max),1),$get(toolbox.max),$add($getpvar(toolbox.offset),$get(toolbox.step))),)
$panel(Toolbox,Track Display,25,$add($get(bottompanel.y),3),$sub(%_width%,50),$sub($get(bottompanel.height),5),)
// -- Toolbox End -- //
,
$drawrect(5,$get(bottompanel.y),$sub(%_width%,10),$get(bottompanel.height),brushcolor-null pencolor-0-0-0)
$panel(Track Info,Track Display,7,$sub(%_height%,73),$sub(%_width%,14),41,)
)
)
// Bottom Bar
$panel(Progress,Seekbar,0,$sub(%_height%,30),%_width%,14,)
$puts(offset.button.x,$sub(%_width%,0))
$puts(offset.button.y,$sub(%_height%,15))
$button2(32,$get(offset.button.y),0,0,14,14,T,t,'PVAR:SET:mainpanel.mode:2',TOOLTIP:Test)
$button2(2,$get(offset.button.y),0,0,14,14,'$imageabs2(14,14,,,,,,,/images\Yotsuya\button.playlist.png,)','$imageabs2(14,14,,,,,,,/images\Yotsuya\button.save.png,)','PVAR:SET:mainpanel.mode:0',TOOLTIP:Playlist)
$button2(16,$get(offset.button.y),0,0,14,14,'$imageabs2(14,14,,,,,,,/images\Yotsuya\button.vis.png,)','$imageabs2(14,14,,,,,,,/images\Yotsuya\button.save.png,)','PVAR:SET:mainpanel.mode:1',TOOLTIP:Visualization)
$puts(offset.button.x,$div(%_width%,2))
$puts(offset.button.y,$sub(%_height%,16))
$button($sub($get(offset.button.x),50),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.left.prev.png,/images\Yotsuya\button.bright.left.prev.png,Previous,)
$button($sub($get(offset.button.x),25),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.center.stop.png,/images\Yotsuya\button.bright.center.stop.png,Stop,)
$button($get(offset.button.x),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.center.$if(%ispaused%,pause,play).png,/images\Yotsuya\button.bright.center.$if(%ispaused%,pause,play).png,Play or Pause,TOOLTIP:$if(%isplaying%,$if(%ispaused%,Resume,Pause),Play))
$button($add($get(offset.button.x),25),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.right.next.png,/images\Yotsuya\button.bright.right.next.png,Next,)
$panel(Volume,Volume,$sub(%_width%,100),$sub(%_height%,16),100,16,)
the layout selector code is only evaluated when the playlist changes / or a new sorting/grouping is applied. ideally you shouldn't have to manually select a layout, but the layout should be automatically chosen based on the sorting/grouping pattern. with the new sort/group main menu with the new version you should be able to create a preset and button as a workaround though.
I would like the ability to manually switch layouts on the same playlist with a button. (i.e.: album vs. singles groupings on the same playlist). While this could be accomplished by switching sort/group patterns I think that switching layouts would offer much more flexibilty. The mechanisms to accomplish this all appear to be there there if we could somehow force SCPL to refresh. I have read several other posts where users have requested the ability to force SCPL to refresh for various reasions. Would it be possible to add a button command to force the refresh? We could then stack this on any other button to accomplish various things. Maybe a way to hook into when pvars are set to trigger a refresh. The new layout code appears to be very powerful but if it is not re-evaluated when the variables change then it loses much of its potential functionality.