当前位置: 首页>>代码示例>>Python>>正文


Python ConfigBaseWidget.keyOK方法代码示例

本文整理汇总了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)
开发者ID:c0ns0le,项目名称:iptvplayer-for-e2-fork,代码行数:36,代码来源:confighost.py

示例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)
开发者ID:samsamsam-iptvplayer,项目名称:iptvplayer-for-e2,代码行数:17,代码来源:iptvconfigmenu.py


注:本文中的Plugins.Extensions.IPTVPlayer.components.configbase.ConfigBaseWidget.keyOK方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。