コード例 #1
0
ファイル: QuickMenu.py プロジェクト: Openeight/enigma2
	def okSubList(self):
		item = self['sublist'].getCurrent()
		if item[0] == _('Network Wizard'):
			self.session.open(NetworkWizard)
		elif item[0] == _('Network Adapter Selection'):
			self.session.open(NetworkAdapterSelection)
		elif item[0] == _('Network Interface'):
			self.session.open(AdapterSetup, self.activeInterface)
		elif item[0] == _('Network Restart'):
			self.session.open(RestartNetwork)
		elif item[0] == _('Network Services'):
			self.Qnetworkservices()
			self['sublist'].moveToIndex(0)
		elif item[0] == _('Samba'):
			self.session.open(NetworkSamba)
		elif item[0] == _('NFS'):
			self.session.open(NetworkNfs)
		elif item[0] == _('FTP'):
			self.session.open(NetworkFtp)
		elif item[0] == _('AFP'):
			self.session.open(NetworkAfp)
		elif item[0] == _('OpenVPN'):
			self.session.open(NetworkOpenvpn)
		elif item[0] == _('MiniDLNA'):
			self.session.open(NetworkMiniDLNA)
		elif item[0] == _('Inadyn'):
			self.session.open(NetworkInadyn)
		elif item[0] == _('SABnzbd'):
			self.session.open(NetworkSABnzbd)
		elif item[0] == _('uShare'):
			self.session.open(NetworkuShare)
		elif item[0] == _('Telnet'):
			self.session.open(NetworkTelnet)
		elif item[0] == _('Customize'):
			self.openSetup('usage')
		elif item[0] == _('Display Settings'):
			self.openSetup('lcd')
		elif item[0] == _('LCD Skin Setup'):
			self.session.open(LcdSkinSelector)
		elif item[0] == _("Skin Setup"):
			self.session.open(SkinSelector)
		elif item[0] == _('User interface'):
			self.openSetup('userinterface')
		elif item[0] == _("Recording paths"):
			self.session.open(RecordPathsSettings)
		elif item[0] == _('Recording settings'):
			self.openSetup('recording')
		elif item[0] == _('EPG settings'):
			self.openSetup('epgsettings')
		elif item[0] == _('Network Mount Manager'):
			self.session.open(AutoMountManager, None, plugin_path_networkbrowser)
		elif item[0] == _('Network Browser'):
			self.session.open(NetworkBrowser, None, plugin_path_networkbrowser)
		elif item[0] == _('Device Mount Manager'):
			self.session.open(DevicesMountPanel)
		elif item[0] == _('Softcam Panel'):
			self.session.open(SoftcamPanel)
		elif item[0] == _('Softcam-Panel Setup'):
			self.session.open(ShowSoftcamPanelExtensions)
		elif item[0] == _('Download Softcams'):
			self.session.open(ShowSoftcamPackages)
		elif item[0] == _('Cam Setup'):
			self.session.open(ScNewSelection)
		elif item[0] == _("Ecm Info Sc"):
			self.session.open(ScSetupScreen)
		elif item[0] == _("Ecm Info"):
			self.session.open(EcmInfoConfigMenu)
		elif item[0] == _('AV Settings'):
			videoSetupMain(self.session)
		elif item[0] == _('Auto Resolution'):
			autoresSetup(self.session)
		elif item[0] == _('Auto Language'):
			self.openSetup('autolanguagesetup')
		elif item[0] == _('Automatic Volume Adjustment'):
			self.session.open(AutomaticVolumeAdjustmentConfigScreen)
		elif item[0] == _('Audio Sync'):
			self.session.open(AC3LipSyncSetup, plugin_path_audiosync)
		elif item[0] == _("Testscreens"):
			self.session.open(VideoFinetune)
		elif item[0] == _('VideoEnhancement'):
			self.session.open(VideoEnhancementSetup)
		elif item[0] == _("Hdmi CEC"):
			if HDMICEC == True:
				self.session.open(HdmiCECSetupScreen)
			else:
				self.session.open(MessageBox, _('Sorry,\nHdmi CEC is not available for this box at the moment.'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('Tuner Configuration'):
			self.session.open(NimSelection)
		elif item[0] == _('Positioner Setup'):
			self.PositionerMain()
		elif item[0] == _("Sundtek Control Center"):
			self.session.open(SundtekControlCenter)
		elif item[0] == _('Automatic Scan'):
			self.session.open(ScanSimple)
		elif item[0] == _('Manual Scan'):
			self.session.open(ScanSetup)
		elif item[0] == _("Fallback remote receiver setup"):
			self.session.open(SetupFallbacktuner)
		elif item[0] == _("Fast Scan"):
			FastScanMain(self.session)
		elif item[0] == _("Blind Scan"):
			BlindscanMain(self.session)
		elif item[0] == _("Cable Scan"):
			CableScanMain(self.session)
		elif item[0] == _("Terrestrial Scan"):
			TerrestrialScanMain(self.session)
		elif item[0] == _('Sat Finder'):
			self.SatfinderMain()
		elif item[0] == _('Software Update'):
			self.session.open(SoftwarePanel)
		elif item[0] == _('Flash Online'):
			self.session.open(FlashOnline)
		elif item[0] == _('Complete Backup'):
			if DFLASH == True:
				self.session.open(dFlash)
			else:
				self.session.open(ImageBackup)
		elif item[0] == _('Backup Settings'):
			self.session.openWithCallback(self.backupDone, BackupScreen, runBackup=True)
		elif item[0] == _('Restore Settings'):
			self.backuppath = getBackupPath()
			if not path.isdir(self.backuppath):
				self.backuppath = getOldBackupPath()
			self.backupfile = getBackupFilename()
			self.fullbackupfilename = self.backuppath + '/' + self.backupfile
			if os.path.exists(self.fullbackupfilename):
				self.session.openWithCallback(self.startRestore, MessageBox, _('Are you sure you want to restore your %s %s backup?\nSTB will restart after the restore') % (getMachineBrand(), getMachineName()))
			else:
				self.session.open(MessageBox, _('Sorry no backups found!'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('Select Backup files'):
			self.session.openWithCallback(self.backupfiles_choosen, BackupSelection)
		elif item[0] == _('Software Manager Setup'):
			self.session.open(SoftwareManagerSetup)
		elif item[0] == _('Plugin Browser'):
			self.session.open(PluginBrowser)
		elif item[0] == _('Download Plugins'):
			self.session.open(PluginDownloadBrowser, 0)
		elif item[0] == _('Remove Plugins'):
			self.session.open(PluginDownloadBrowser, 1)
		elif item[0] == _('Plugin Filter'):
			self.session.open(PluginFilter)
		elif item[0] == _('IPK Installer'):
			try:
				from Plugins.Extensions.MediaScanner.plugin import main
				main(self.session)
			except:
				self.session.open(MessageBox, _('Sorry MediaScanner is not installed!'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('IPK Uninstaller'):
			try:
				self.session.open(Ipkuninstall)
			except:
				self.session.open(MessageBox, _('Sorry IPK-uninstaller is not installed!'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('Harddisk Setup'):
			self.openSetup('harddisk')
		elif item[0] == _('Initialization'):
			self.session.open(HarddiskSelection)
		elif item[0] == _('Filesystem Check'):
			self.session.open(HarddiskFsckSelection)
		return
コード例 #2
0
	def okSubList(self):
		item = self['sublist'].getCurrent()
		if item[0] == _('Network Wizard'):
			self.session.open(NetworkWizard)
		elif item[0] == _('Network Adapter Selection'):
			self.session.open(NetworkAdapterSelection)
		elif item[0] == _('Network Interface'):
			self.session.open(AdapterSetup, self.activeInterface)
		elif item[0] == _('Network Restart'):
			self.session.open(RestartNetwork)
		elif item[0] == _('Network Services'):
			self.Qnetworkservices()
			self['sublist'].moveToIndex(0)
		elif item[0] == _('Samba'):
			self.session.open(NetworkSamba)
		elif item[0] == _('NFS'):
			self.session.open(NetworkNfs)
		elif item[0] == _('FTP'):
			self.session.open(NetworkFtp)
		elif item[0] == _('AFP'):
			self.session.open(NetworkAfp)
		elif item[0] == _('OpenVPN'):
			self.session.open(NetworkOpenvpn)
		elif item[0] == _('MiniDLNA'):
			self.session.open(NetworkMiniDLNA)
		elif item[0] == _('Inadyn'):
			self.session.open(NetworkInadyn)
		elif item[0] == _('SABnzbd'):
			self.session.open(NetworkSABnzbd)
		elif item[0] == _('uShare'):
			self.session.open(NetworkuShare)
		elif item[0] == _('Telnet'):
			self.session.open(NetworkTelnet)
		elif item[0] == _('Customize'):
			self.openSetup('usage')
		elif item[0] == _('Display Settings'):
			self.openSetup('lcd')
		elif item[0] == _('LCD Skin Setup'):
			self.session.open(LcdSkinSelector)
		elif item[0] == _('Skin Setup'):
			self.session.open(SkinSelector)
		elif item[0] == _('User interface'):
			self.openSetup('userinterface')
		elif item[0] == _('Recording paths'):
			self.session.open(RecordPathsSettings)
		elif item[0] == _('Recording settings'):
			self.openSetup('recording')
		elif item[0] == _('EPG settings'):
			self.openSetup('epgsettings')
		elif item[0] == _('Language'):
			self.session.open(LanguageSelection)
		elif item[0] == _('Network Mount Manager'):
			self.session.open(AutoMountManager, None, plugin_path_networkbrowser)
		elif item[0] == _('Mount again'):
			AutoMount()
			self.session.open(MessageBox, _('Network Shares are Mounted again.'), MessageBox.TYPE_INFO, timeout=3)
		elif item[0] == _('Network Browser'):
			self.session.open(NetworkBrowser, None, plugin_path_networkbrowser)
		elif item[0] == _('Device Mount Manager'):
			self.session.open(DevicesMountPanel)
		elif item[0] == _('Softcam Panel'):
			self.session.open(SoftcamPanel)
		elif item[0] == _('Softcam-Panel Setup'):
			self.session.open(ShowSoftcamPanelExtensions)
		elif item[0] == _('Download Softcams'):
			self.session.open(ShowSoftcamPackages)
		elif item[0] == _('Cam Setup'):
			self.session.open(ScNewSelection)
		elif item[0] == _('Ecm Info Sc'):
			self.session.open(ScSetupScreen)
		elif item[0] == _('Softcam-Setup'):
			self.session.open(SoftcamSetup)
		elif item[0] == _('Ecm Info'):
			self.session.open(EcmInfoConfigMenu)
		elif item[0] == _("CCcam Info"):
			self.session.open(CCcamInfoMain)
		elif item[0] == _("OScam Info"):
			self.session.open(OscamInfoMenu)
		elif item[0] == _('AV Settings'):
			videoSetupMain(self.session)
		elif item[0] == _('Auto Resolution'):
			autoresSetup(self.session)
		elif item[0] == _('Auto Language'):
			self.openSetup('autolanguagesetup')
		elif item[0] == _('Automatic Volume Adjustment'):
			self.session.open(AutomaticVolumeAdjustmentConfigScreen)
		elif item[0] == _('Audio Sync'):
			self.session.open(AC3LipSyncSetup, plugin_path_audiosync)
		elif item[0] == _('Testscreens'):
			self.session.open(VideoFinetune)
		elif item[0] == _('VideoEnhancement'):
			self.session.open(VideoEnhancementSetup)
		elif item[0] == _('Hdmi CEC'):
			if HDMICEC == True:
				self.session.open(HdmiCECSetupScreen)
			else:
				self.session.open(MessageBox, _('Sorry,\nHdmi CEC is not available for this box at the moment.'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('Tuner Configuration'):
			self.session.open(NimSelection)
		elif item[0] == _('Positioner Setup'):
			self.PositionerMain()
		elif item[0] == _('Sundtek Control Center'):
			self.session.open(SundtekControlCenter)
		elif item[0] == _('Automatic Scan'):
			self.session.open(ScanSimple)
		elif item[0] == _('Manual Scan'):
			self.session.open(ScanSetup)
		elif item[0] == _('Fallback remote receiver setup'):
			self.session.open(SetupFallbacktuner)
		elif item[0] == _('Fast Scan'):
			FastScanMain(self.session)
		elif item[0] == _('Blind Scan'):
			BlindscanMain(self.session)
		elif item[0] == _('Cable Scan'):
			CableScanMain(self.session)
		elif item[0] == _('MIS/PLS LCN Scan'):
			MisPlsLcnScanMain(self.session)
		elif item[0] == _('Terrestrial Scan'):
			TerrestrialScanMain(self.session)
		elif item[0] == _('Sat Finder'):
			self.SatfinderMain()
		elif item[0] == _('Software Update'):
			self.session.open(SoftwarePanel)
		elif item[0] == _('Flash Online'):
			self.session.open(FlashOnline)
		elif item[0] == _('Complete Backup'):
			if DFLASH == True:
				self.session.open(dFlash)
			else:
				self.session.open(ImageBackup)
		elif item[0] == _('Backup Settings'):
			self.session.openWithCallback(self.backupDone, BackupScreen, runBackup=True)
		elif item[0] == _('Restore Settings'):
			self.backuppath = getBackupPath()
			if not path.isdir(self.backuppath):
				self.backuppath = getOldBackupPath()
			self.backupfile = getBackupFilename()
			self.fullbackupfilename = self.backuppath + '/' + self.backupfile
			if os.path.exists(self.fullbackupfilename):
				self.session.openWithCallback(self.startRestore, MessageBox, _('Are you sure you want to restore your %s %s backup?\nSTB will restart after the restore') % (getMachineBrand(), getMachineName()))
			else:
				self.session.open(MessageBox, _('Sorry no backups found!'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('Select Backup files'):
			self.session.openWithCallback(self.backupfiles_choosen, BackupSelection)
		elif item[0] == _('Software Manager Setup'):
			self.session.open(SoftwareManagerSetup)
		elif item[0] == _('Plugin Browser'):
			self.session.open(PluginBrowser)
		elif item[0] == _('Download Plugins'):
			self.session.open(PluginDownloadBrowser, 0)
		elif item[0] == _('Remove Plugins'):
			self.session.open(PluginDownloadBrowser, 1)
		elif item[0] == _('Plugin Filter'):
			self.session.open(PluginFilter)
		elif item[0] == _('IPK Installer'):
			try:
				from Plugins.Extensions.MediaScanner.plugin import main
				main(self.session)
			except:
				self.session.open(MessageBox, _('Sorry MediaScanner is not installed!'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('IPK Uninstaller'):
			try:
				self.session.open(Ipkuninstall)
			except:
				self.session.open(MessageBox, _('Sorry IPK-uninstaller is not installed!'), MessageBox.TYPE_INFO, timeout=10)
		elif item[0] == _('Harddisk Setup'):
			self.openSetup('harddisk')
		elif item[0] == _('Initialization'):
			self.session.open(HarddiskSelection)
		elif item[0] == _('Filesystem Check'):
			self.session.open(HarddiskFsckSelection)
		return