Progress bar in python (no focus)
#1
Hi,

For my XinBox script, i would like to start a new thread for checking emails and have it update a progress bar while the user can still do various other things (like you can in XBMC when updating library etc).

Any ideas?
Reply
#2
Thumbs Up 
Hi stanley87,

First of all, thanks for your script.
Concerning your problem, I have currently working on something similar, except what I wanted to do was download in background but displaying a progress bar to the user without blocking him (as you so xbmcgui dialogprogress block the user while it is open).
I extracted the code from the script I am currently developing and created a module xbmcguiExtension.py which include (for the moment) 2 classes:
- backProgressBar: which is the class in charge of displaying the progress bar on your main window
- guiCtrl which is used by backProgressBar for UI locking/unlocking, that means you will need to use in your UI the locking/unlocking of guiCtrl instead of lock/unlock provided by xbmcgui.

I have also included an example with the to type of progress bar, xbmcgui progressbar and backProgressBar.

It is far to be finished (at list the full module) but for those class, it is pretty completed and look pretty well for me.

The only issue I see, it XBMC (on my XBOX) doesn't like too much to do 2 things at the same time.

Here is the link where to get the library: http://passion-xbmc.org/developpement/xb...attach=876

If you have any comments or see any ways to improve this library, do not hesitate.
Reply
#3
Great!
I will give it ago :-D
Reply
#4
maybe i misunderstand?

there is a progressbar control (not a dialog). you can make your own dialog or put it on your main window.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
Yes, that is the purpose of the script I included.
Mostly you need to create few contol in you window, and pass them as paramter to the class I have written.
After that you need to call on it an update, and that's it. The only thing that is important is to use the other class to lock the UI since the progress bar class will unlock it if necessary.
It is not perfect and can be improve, but it works, but it is a Python module not a xbmclib.
You can try to run the example in order to see what it looks it if you want.
Reply
#6
why don't you just use the progress control? xbmcgui.ControlProgress()

pydocs link in my signature
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#7
I think it is because I am still pretty with Python and XBMC and I never notice this class before.
Shame on me! I will try it, thanks Nuka1195.
Reply
#8
ahh, i missed that!
I'll just use that then!
Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
Progress bar in python (no focus)0