def onAction(self, action): # exit if action.getId() in [xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK]: self.close() if submenu: open_shortcut_menu(self=True) if action.getId() == xbmcgui.ACTION_CONTEXT_MENU: config.open_settings() focus = self.getFocusId() if action == 3: if focus == 61: self.setFocusId(32500) elif submenu: self.close() open_shortcut_menu(self=True) elif self.getControl(32500).getSelectedItem().getProperty('channel') in ['news', 'channelselector', 'search', 'videolibrary']: channel_name = self.getControl(32500).getSelectedItem().getProperty('channel') if channel_name == 'channelselector': import channelselector self.close() open_shortcut_menu(channelselector.getchanneltypes(), channel_name, self=True) else: from core.item import Item channel = __import__('specials.%s' % channel_name, fromlist=["specials.%s" % channel_name]) self.close() open_shortcut_menu(channel.mainlist(Item()), channel_name, self=True)
def onClick(self, control): if control == 3075: config.set_setting("show_once", True) self.close() control = self.getControl(control).getLabel().lower() if control == "comenzar": self.close_greeter() elif control == "videoteca": xbmc_videolibrary.ask_set_content(1, silent=True) config.set_setting('show_once', True) elif control == "cliente torrent": from channels import setting setting.setting_torrent(Item()) elif control == "titulos inteligentes": from platformcode import colors from platformcode import unify unify.init_colors() colors.show_window() elif control == "set de iconos": from channels import setting setting.icon_set_selector() elif control == "ajustes avanzados": self.close() config.open_settings() elif control == "continuar": config.set_setting("show_once", True) self.close()
def onAction(self, action): # exit if action.getId() in [ xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK ]: # main.close() xbmc.executebuiltin('Dialog.Close(all,true)') if action.getId() == xbmcgui.ACTION_CONTEXT_MENU: config.open_settings()
def SettingOnPosition(item): # addonId is the Addon ID # item.category is the Category (Tab) offset (0=first, 1=second, 2...etc) # item.setting is the Setting (Control) offse (0=first, 1=second, 2...etc) # This will open settings dialog focusing on fourth setting (control) inside the third category (tab) import xbmc from platformcode import config config.open_settings() category = item.category if item.category else 0 setting = item.setting if item.setting else 0 logger.debug('SETTING= ' + str(setting)) xbmc.executebuiltin('SetFocus(%i)' % (category - 100)) xbmc.executebuiltin('SetFocus(%i)' % (setting - 80))
def settings(item): config.open_settings()
def settings_menu(item): from platformcode import config config.open_settings()