•   
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 13
  •   
WindowXML GUI Toolkit (replaces GUIBuilder for XBMC python scripts for GUI coding)
#16
WindowXML Progress Update
Thanks to JMarshal, I was able to fix the problems remaining in the WindowXML Code.
So now you can navigate to the list if you change the view. Fallback for xml and media also works now.
The only thing off the top of my head I can see missing is the WindowXMLDialog Smile to make your own DialogOK etc.
Ill try to code WindowXMLDialog ASAP, unless there is anything other critical thing that is required, I think that makes it close for going in the trunk and public use.

Just to let you know I have a few other little improvements I want to do with the “Scripts window”, so stay tuned.
** Team XBMC Tester** XBMC 4 ever

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: badge.gif]
Reply
#17
Can you allow being able to specify whether it is a window/dialog in the XML? That would definitely give skinners more flexibility.

How does the xml parsing compare to guibuilder?
Reply
#18
How to use getSelectedItem/Position from the Listitem? Is this implemented yet?

cheerz
asciii
Reply
#19
guibuilder, uses the same functions that are in XBMC translated to python, of course WindowXML will be faster and better on memory.

Why do you ask asteron?

ascii you should read the python docs they clearly explain it.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#20
Well I was wondering if Donno had some quantitative numbers. I asked "How does it compare?" and not "Is it better?"

I was worried that XML parsing would be similar since the xml.minidom module is from the python.dll which is written in C and I havent done a profile of your code to identify where it spends most of its time Smile

But yeah you're probably right in that the initial time load time is probably a lot less than the iterating over the nodes so the savings should be very significant.
Reply
#21
@Nuka1195

the python docs dont really help when the listitem is empty Smile getcontrol on the list (id 50) doesnt work ..
Reply
#22
Well since Donno's "never" been able to get guibuilder working. I guess not.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#23
Its done WindowXML, is now in the trunk. When i get some time i might document it some more etc. But for now there is a example script in the scripts folder in the xbmc trunk.

WindowXMLDialog is now in, and the thing should fully work. Fallback stuff and all. I will also try to keep looking here for new posts. Please if you have some questions about how ti works put them here? As well as feature suggestions and ideas.

ascii: Listitem does not have a getSelectedItem/Position function.
getSelectedItem returns a ListItem. getSelectedItem/Position are Functions of the ControlList

as for stats i don't know but most of the bulk of hte code is now as c/c++ so it should be ideally faster, its also nicer on the eyes as xbmc handles more stuff, also i reuse things xbmc can already do so its not tottally making hte whole GuiBuilder in c++/c

Updated xbmcgui.html

Over the next few days im going to clean up the formatting of the python section of XBMC and also will complete the pydocs. (just noticed that i forgot to explain the paramters needed to run it in the docs)
** Team XBMC Tester** XBMC 4 ever

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: badge.gif]
Reply
#24
Congrats Donno,

I will start converting now Smile
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#25
congrats.. great work man..

Smile
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.
If you don't have the time to read them, please don't take the time to post in this forum!
For troubleshooting and bug reporting please make sure you read this first.
Reply
#26
Hi guys as on revison 8230 I've commited a new updated version of pm3 skin it no longer has any Tv overscan compenstation in it (and dosn't need it because we have calibration) and is now full screen like all the other new skins.
So you will need to take this into account when making new pm3 versions of skins for scripts because all the alignment / images have changed and if current skins use background.png from pm3 then will not be aligned proper. And if it uses its own images it will look zoomed out because your script uses the old skin zoom scale that compensated for the Overscan in the skin

Hope that makes sense and sorry Sad but its needed for better things in the future.

Jezz_X
Reply
#27
Great job in finishing Donno! Wooo! Ill be sure to put it through its paces Smile

Though I would prefer for the "Dialog" part to be either specified in the xml or passed as a keyword argument to WindowXML. I dont see a reason for it to be a seperate python object if no new functionality is exposed... Can't you do a pointer to CGUIWindow or CGUIWindowDialog behind the scenes?

Its not that all that big of an issue but it makes the whole idea of it being a window/dialog to the skinner instead of the scripter...
Reply
#28
I'm against the let Windows and Dialogs be interchanged as XBMC doesn't allow this. You can not make the myscripts.xml or home.xml or etc a Dialog. Thou if you really want you could just use WindowXMLDialog instead, there should be nothing really wrong with that. Coz in your opioion a Window just fills the whole screen, where a dialog can fill an area and has a transparent background.
** Team XBMC Tester** XBMC 4 ever

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: badge.gif]
Reply
#29
I was looking at making a script using WindowXML, and i wanted to get the position in the list and i noticed whoops i forgot those functions. However Smile i quickly added them
print self.getCurrentListPosition()
print self.getListItemself.getSelectedListItem().getLabel2()
print self.getSelectedListItem().getLabel()

So ive added getListItem and getCurrentListPosition. There was getSelectedListItem but that was removed due to redudancy of hte getListItem.

Note) getListItem is a new object created with the infomation from the list item in the windows vectorlist, im 99% sure that setLabel2 and setLabel will not work. I'll look at adding a setListItem so you can change the infomation.

Also, next day or two i might change the WindowXML so it takes
scriptPath = os.getcwd().replace(';','')

WindowXML("Script_WindowXMLExample.xml",scriptPath,"DefaultSkin")
point of this is WindowXML would now also check scriptPath+"\\skins\\currentskin\\" for the file then scriptPath+"\\skins\\DefaultSkin\\" as a last resort. Thanks Jezz_X for this idea. Ill try to make "DefaultSkin" variable optional and default to "Default". So bare this in mind if you’re considering using WindowXML soon.
** Team XBMC Tester** XBMC 4 ever

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: badge.gif]
Reply
#30
In my script I use the list view as a kind of directory tree browser, so I have folders and video clips. This worked well before changing to WindowXML.
I got the select action in onControl, issued the relevant command, and I got the back action and the previous menu action to onAction, so that I could move up in the directory tree.
With WindowXML, when I press back/previous menu buttons they end up both in onClick and onAction, is the way it is supposed to work? Just wanted to know before I start hacking around it.
Reply
  •   
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 13
  •   
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
WindowXML GUI Toolkit (replaces GUIBuilder for XBMC python scripts for GUI coding)00