Addon().openSettings(): what happens if user clicks Cancel
#1
My addon does something like this:

Code:
myAddon = xbmcaddon.Addon()
if a_certain_condition:
    myAddon.openSettings()
    if USER_CLICKED_OK:
         DoMeaningfulStuff()
    else:
         exit()

What I'm having trouble figuring out is how to write the USER_CLICKED_OK condition: how do I detect whether the user clicked OK or Cancel in the (fairly basic) settings dialog I have popped up?
Reply
#2
Detect onsettingsupdated in monitor. See pydocs
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Many thanks Martijn, it pointed in the right direction. For future recollection, the callback is Monitor.onSettingsChanged: http://mirrors.kodi.tv/docs/python-docs/...ngsChanged
Reply

Logout Mark Read Team Forum Stats Members Help
Addon().openSettings(): what happens if user clicks Cancel0