Working dialog/notification
#1
is possible to display working dialog/notification from python addon?

Image
Reply
#2
i don't think that one (the busy dialog) is accessible for python.

perhaps you can use one of these instead:
DialogProgressBG
Dialog-notification
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
What about:
PHP Code:
xbmc.executebuiltin('ActivateWindow(10138)')
xbmc.executebuiltin('Dialog.Close(10138)'
?

UPD: Just checked: it works.
Reply
#4
nice
Reply
#5
Code:
def show_busy_dialog():
    xbmc.executebuiltin('ActivateWindow(busydialog)')

def hide_busy_dialog():
    xbmc.executebuiltin('Dialog.Close(busydialog)')
    while xbmc.getCondVisibility('Window.IsActive(busydialog)'):
        time.sleep(.1)
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#6
(2015-12-19, 01:29)Lunatixz Wrote:
Code:
def show_busy_dialog():
    xbmc.executebuiltin('ActivateWindow(busydialog)')

def hide_busy_dialog():
    xbmc.executebuiltin('Dialog.Close(busydialog)')
    while xbmc.getCondVisibility('Window.IsActive(busydialog)'):
        time.sleep(.1)

One small tweak - better to use xbmc.sleep(100), rather than time.sleep(.1) - my understanding is that we shouldn't be using time.sleep(), xbmc.sleep() allows for event processing, I could be wrong though.
Reply
#7
(2015-12-19, 04:51)learningit Wrote: One small tweak - better to use xbmc.sleep(100), rather than time.sleep(.1) - my understanding is that we shouldn't be using time.sleep(), xbmc.sleep() allows for event processing, I could be wrong though.

BTW, I've always wondered: does xbmc.sleep release Python GIL like time.sleep does?
Reply

Logout Mark Read Team Forum Stats Members Help
Working dialog/notification0