Skip to content

Instantly share code, notes, and snippets.

@monkey-codes
Created November 17, 2016 06:14
Show Gist options
  • Select an option

  • Save monkey-codes/71c652aae4385df89f578adebc64cfc8 to your computer and use it in GitHub Desktop.

Select an option

Save monkey-codes/71c652aae4385df89f578adebc64cfc8 to your computer and use it in GitHub Desktop.
Kodi busy dialog
def cmd_busy(command):
def busy_command(option):
xbmc.executebuiltin( "ActivateWindow(busydialog)" )
retVal = command(option)
xbmc.executebuiltin( "Dialog.Close(busydialog)" )
return retVal
return busy_command
def select_main():
menu = [
{'label': 'Display IP location', 'func': cmd_busy(cmd_display_current_location), 'complete': select_main},
{'label': 'Select VPN', 'func': cmd_busy(cmd_select_vpn), 'complete': select_main}
]
select('OpenVPN', menu, default=select_noop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment