Change Control list Label Dimensions?
#1
Hi,

in my script, i was wanting the user to be able to change widths of control list labels (columns) and also add more columns etc.

Any thoughts? (without having to edit the xml)

Maybe view types.....


Dunno

Hmm maybe use the skin settings... and set the dimensions via the script..
Can you use skin settings in width etc? don't they return a string not a int?
Reply
#2
If you want to alter width's you could use skin constants which means only changing a single XML file.

IMO different viewtypes would be the way to go though.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
yeh, i was hoping for something "on-the-fly" and could change dimensions to any size..
Reply
#4
i might try that skin constant idea.
have one xml file - REAL simple file with the dimensions for the control list labels etc.
And change this file via the script.
This file could also be stored maybe with the user data, so it remembers different views for the different users etc..

in saying that... will a includes.xml file have to be in the winxml skin foldeR?

hmm, has anyone tried using includes.xml with winxml before? can't get it to work...
Reply
#5
Ok, so i think there may be a bug.
First, the includes.xml file has to be in:
script/resources/skin/default folder
INFO: Loading skin includes from Q:\scripts\XinBox\resources\skins\Default\includes.xml
not in the PAL folder
So, now it finds the file
But the log reads:
WARNING: Skin has invalid include: test
for any include i try.
I tryed copying the skins include.xml to make sure my include.xml wasnt dodgy
Still no go.
But, if i use an include from the skins include.xml it works no problem

Ok, i also tried this:

<includes>
<include file="P:\script_data\XinBox\test.xml" />
</includes>

and i get:

19:43:58 M:1601224704 INFO: Loading skin includes from Q:\scripts\XinBox\resources\skins\Default\includes.xml
19:43:58 M:1601183744 INFO: Error loading includes.xml file (Q:\skin\MediaStream\720p\P:\script_data\XinBox\test.xml): Failed to open file (row=0, col=0)

So, it obviously has a default path of the skin dir... so including other files not in this dir seems impossible...
Maybe this could be changed? So it tries to find the file then default to the skin dir..?
this would enable for :<include file="P:\script_data\XinBox\test.xml" /> and <include file="test.xml" />


Any ideas?
Reply
#6
In your winxml file, include it like this:

<include file="blah">includename</include>
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
Ok, will try :-D
Reply
#8
20:30:03 M:1600311296 INFO: Loading skin includes from Q:\scripts\XinBox\resources\skins\Default\includes.xml
20:30:03 M:1600286720 DEBUG: Activating window ID: 13000
20:30:03 M:1600274432 DEBUG: Checking if window ID 13000 is locked.
20:30:04 M:1608835072 INFO: Loading skin file: Q:\scripts\XinBox\resources\skins\Default\PAL16x9\script-XinBox-mainmenu.xml
20:30:04 M:1608761344 WARNING: Skin has invalid include: heythere


Nope, still wont load the includes in the includes.xml file.
As for having other paths for includes.xml, would a change in GUIincludes.cpp line 84:
from:
LoadIncludes(g_SkinInfo.GetSkinPath(node->Attribute("file"), &res));

to:

if (!LoadIncludes(node->Attribute("file")))
LoadIncludes(g_SkinInfo.GetSkinPath(node->Attribute("file"), &res));

do the trick?
Then you could do:

<include file="P:\script_data\XinBox\test.xml" /> YES?

im gonna give it ago, but also DEBUG on why it isnt loading the includes in the includes.xml
Reply
#9
includes.xml inside the script isn't supported as we didn't see the point in it. Altering it on the fly isn't going to work without reloading the skin anyway (constants or not) as the XML is only loaded once.

IMO different viewtypes seems like the way to go - you have 10 at your disposal, and via skin settings or whatever you effectively have unlimited if you really need it using conditional <itemlayout>'s.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
includes.xml inside the script isn't supported as we didn't see the point in it. Altering it on the fly isn't going to work without reloading the skin anyway (constants or not) as the XML is only loaded once.

IMO different viewtypes seems like the way to go - you have 10 at your disposal, and via skin settings or whatever you effectively have unlimited if you really need it using conditional <itemlayout>'s.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
Well, for fun i changed the above and build a new xbmc_pc.exe:
and i get:

21:03:38 M:1551888384 INFO: Error loading includes.xml file (P:\script_data\XinBox\test.xml): Error document empty. (row=0, col=0)
21:03:38 M:1551888384 INFO: Error loading includes.xml file (Q:\skin\MediaStream\720p\P:\script_data\XinBox\test.xml): Failed to open file (row=0, col=0)

So, it can now load includes files from a full path (i put an emtpy file there so it failed and showed both locations being tried).

The only annoying thing is that when the skin loads an includes file, you get error before it loads the actual file.

I just thought of this, it checks in the other order (being most would use the include.xml or whatever the file is called in the skins dir)

Im sure this could come in handy......
Reply
#12
I wanted something more integrated in the flow of the web page - a box with a small preview image with caption, the possibility to flip through an array of more thumbnails and, of course, to show an enlarged version, all in one place. Lightbox offers that. Moreover, I wanted the box to stay anchored to the page layout and not hovering above it disconnectedly. The way to achieve this was writing a script which would fix one corner of the enlarged image to the exact spot where the thumbnail had been.After toying around for a while, I decided to put the final outcome into a proper jQuery plugin and see, what other people (you!) think. May jQuery.popeye be of use
Reply

Logout Mark Read Team Forum Stats Members Help
Change Control list Label Dimensions?1