Stop a BGprogressbar from another instancie of addon.
#1
Hey,

My addon has a progress dialog in the background, and I want to add a button to stop this dialog.

My addon has a button that opens the progress bar, and I want to put a button that when pressed, you will notice that that X progress dialog is running and will close it.

In this case, instance A closes instance B's progress bar.
Reply
#2
perhaps this will work:
python:
if xbmc.getCondVisibility('Window.IsVisible(extendedprogressdialog)')
    xbmc.executebuiltin('Dialog.Close(extendedprogressdialog)')
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2021-07-06, 09:43)ronie Wrote: perhaps this will work:
python:
if xbmc.getCondVisibility('Window.IsVisible(extendedprogressdialog)')
    xbmc.executebuiltin('Dialog.Close(extendedprogressdialog)')
I have tested it and it seems to be working perfectly, thanks.

I just had a doubt, does this method kill the dialogue by force or does it call the close method?
Reply
#4
it will call the close method.
in case you want to force close, use
python:
xbmc.executebuiltin('Dialog.Close(extendedprogressdialog, true)')
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2021-07-06, 17:49)ronie Wrote: it will call the close method.
in case you want to force close, use
python:
xbmc.executebuiltin('Dialog.Close(extendedprogressdialog, true)')

Thank you very much, I help a lot.
Reply

Logout Mark Read Team Forum Stats Members Help
Stop a BGprogressbar from another instancie of addon.0