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


Python ConfigList.invalidate方法代码示例

本文整理汇总了Python中Components.ConfigList.ConfigList.invalidate方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigList.invalidate方法的具体用法?Python ConfigList.invalidate怎么用?Python ConfigList.invalidate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Components.ConfigList.ConfigList的用法示例。


在下文中一共展示了ConfigList.invalidate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: BrowserMenu

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import invalidate [as 别名]

#.........这里部分代码省略.........
			list.append(getConfigListEntry(_("Path for persistent storage"), config.plugins.WebBrowser.storage.path))

		self.detailConfigList.setList(list)

	def __cfgExpandableElementChanged(self, element):
		self.__cfgCreateSetup()

	def __cfgSave(self):
		for x in self.detailConfigList.list:
			x[1].save()
		self.__setStatus(_("Settings have been saved successfully!"))

	def __cfgStoragePathChanged(self, element):
		action = [self.ACTION_STORAGE_PATH,True]
		if not action in self.__actions:
			self.__actions.append(action)

	def __cfgCancel(self):
		dlg = self.session.openWithCallback(self.__cfgCancelCB, MessageBox, _("Do you really want to discard all changes?"), type = MessageBox.TYPE_YESNO)
		dlg.setTitle(_("Discard changed settings?"))

	def __cfgCancelCB(self, confirmed):
		for x in self.detailConfigList.list:
			x[1].cancel()
		self.__setStatus(_("All changes to the settings have been discarded!"))

	def __cfgKeyText(self):
		from Screens.VirtualKeyBoard import VirtualKeyBoard
		self.session.openWithCallback(self.__cfgVirtualKeyBoardCallback, VirtualKeyBoard, title = self.detailConfigList.getCurrent()[0], text = self.detailConfigList.getCurrent()[1].getValue())

	def __cfgVirtualKeyBoardCallback(self, callback = None):
		if callback is not None and len(callback):
			self.detailConfigList.getCurrent()[1].setValue(callback)
			self.detailConfigList.invalidate(self.detailConfigList.getCurrent())

	def  __cfgKeyOK(self):
		self.detailConfigList.handleKey(KEY_OK)

	def  __cfgKeyUp(self):
		self.detailConfigList.instance.moveSelection(eListbox.moveUp)

	def  __cfgKeyDown(self):
		self.detailConfigList.instance.moveSelection(eListbox.moveDown)

	def  __cfgKeyLeft(self):
		self.detailConfigList.handleKey(KEY_LEFT)

	def __cfgKeyRight(self):
		self.detailConfigList.handleKey(KEY_RIGHT)

	def __cfgKeyHome(self):
		self.detailConfigList.handleKey(KEY_HOME)

	def __cfgKeyEnd(self):
		self.detailConfigList.handleKey(KEY_END)

	def __cfgKeyDelete(self):
		self.detailConfigList.handleKey(KEY_DELETE)

	def __cfgKeyBackspace(self):
		self.detailConfigList.handleKey(KEY_BACKSPACE)

	def __cfgKeyToggleOW(self):
		self.detailConfigList.handleKey(KEY_TOGGLEOW)

	def __cfgKeyAscii(self):
开发者ID:aitchala,项目名称:enigma2,代码行数:70,代码来源:BrowserMenu.py


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