本文整理汇总了Python中Plugins.Extensions.IPTVPlayer.components.configbase.ConfigBaseWidget.keyOK方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigBaseWidget.keyOK方法的具体用法?Python ConfigBaseWidget.keyOK怎么用?Python ConfigBaseWidget.keyOK使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugins.Extensions.IPTVPlayer.components.configbase.ConfigBaseWidget
的用法示例。
在下文中一共展示了ConfigBaseWidget.keyOK方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: keyOK
# 需要导入模块: from Plugins.Extensions.IPTVPlayer.components.configbase import ConfigBaseWidget [as 别名]
# 或者: from Plugins.Extensions.IPTVPlayer.components.configbase.ConfigBaseWidget import keyOK [as 别名]
def keyOK(self):
if self["config"].instance is None:
return
if self.reorderingEnabled:
if not self.reorderingMode:
self["config"].instance.setForegroundColorSelected(gRGB(0xFF0505))
self.reorderingMode = True
else:
self["config"].instance.setForegroundColorSelected(gRGB(0xFFFFFF))
self.reorderingMode = False
self.runSetup()
return
curIndex = self["config"].getCurrentIndex()
currItem = self["config"].list[curIndex][1]
if curIndex < len(self.listOfHostsNames):
hostName = self.listOfHostsNames[curIndex]
if self.hostsConfigsAvailableList[curIndex] and IsHostEnabled(hostName):
addConf = False
try:
self.host = __import__('Plugins.Extensions.IPTVPlayer.hosts.host' + hostName, globals(), locals(), ['GetConfigList'], -1)
if( len(self.host.GetConfigList()) < 1 ):
printDBG('ConfigMenu host "%s" does not have additional configs' % hostName)
else:
self.session.open(ConfigHostMenu, hostName = hostName)
addConf = True
except:
printExc('ConfigMenu host "%s" does not have method GetConfigList' % hostName)
if not addConf:
self.hostsConfigsAvailableList[curIndex] = False
self.onSelectionChanged()
self.session.open(MessageBox, _("Service [%s] has no additional settings.") % hostName, type=MessageBox.TYPE_INFO, timeout=5)
else:
ConfigBaseWidget.keyOK(self)
示例2: keyOK
# 需要导入模块: from Plugins.Extensions.IPTVPlayer.components.configbase import ConfigBaseWidget [as 别名]
# 或者: from Plugins.Extensions.IPTVPlayer.components.configbase.ConfigBaseWidget import keyOK [as 别名]
def keyOK(self):
curIndex = self["config"].getCurrentIndex()
currItem = self["config"].list[curIndex][1]
if isinstance(currItem, ConfigDirectory):
def SetDirPathCallBack(curIndex, newPath):
if None != newPath: self["config"].list[curIndex][1].value = newPath
self.session.openWithCallback(boundFunction(SetDirPathCallBack, curIndex), IPTVDirectorySelectorWidget, currDir=currItem.value, title="Wybierz katalog")
elif config.plugins.iptvplayer.fakePin == currItem:
self.changePin(start = True)
elif config.plugins.iptvplayer.fakeUpdate == currItem:
self.keyUpdate()
elif config.plugins.iptvplayer.fakeHostsList == currItem:
self.hostsList()
else:
ConfigBaseWidget.keyOK(self)