示例#1
0
	def keyCancel(self):
		if self["config"].isChanged():
			self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"))
		else:
			instandbyon.checkStstus()
			if self.oldfanoffmode is 'ON' :
				instandbyon.checkStatusLoopStart()
			self.close()
示例#2
0
	def cancelConfirm(self, result):
		if not result:
			return
		for x in self["config"].list:
			x[1].cancel()
		instandbyon.checkStstus()
		self.oldfanoffmode = instandbyon.fanoffmode
		if self.oldfanoffmode is 'ON' :
			instandbyon.checkStatusLoopStart()
		self.close()
示例#3
0
	def keySave(self):
		if instandbyon.fanoffmode is 'OFF' and config.plugins.manualfancontrols.pwmvalue.value == 0:
			print "<SimpleFancontrol> instandbyon.fanoffmode 'OFF' -> 'ON'"
			instandbyon.fanoffmode = 'ON'
			instandbyon.addRecordEventCB()
			instandbyon.checkStatusLoopStart()
		elif instandbyon.fanoffmode is 'ON' and config.plugins.manualfancontrols.pwmvalue.value != 0:
			print "<SimpleFancontrol> instandbyon.fanoffmode 'ON' -> 'OFF'"
			instandbyon.fanoffmode = 'OFF'
			instandbyon.removeRecordEventCB()
#			instandbyon.checkStatusLoopStop() # stopped at init
		elif self.oldfanoffmode is 'ON' :
			instandbyon.checkStatusLoopStart()
		instandbyon.checkStstus()
		ConfigListScreen.keySave(self)