<menu text="Mainmenu" title="Main menu">
	<id val="mainmenu" />
<!-- the following types are allowed:
	<screen [module="mod"] [screen="classname"]>[arguments]</screen>
		executes Screen called "classname" from module "Screen.mod"
		if no module is given, Screen must be globally available.
		if no screen is given, module is used as screen class name.
		arguments must be comma seperated (will be fed to eval), and can
			use stuff from module
		(of course you must specify at least one of module, screen.)
	<setup id="id" />
		opens a setup with specified id
	<code> .. code .. </code>
		"exec"s code
-->
		<!-- Menu / Timer -->
		<menu level="0" text="Timers" entryID="timer_menu">
			<id val="timermenu" />
			<item weight="100" level="0" text="CronTimers" entryID="crontimer_edit"><screen module="CronTimer" screen="CronTimers" /></item>
			<item weight="100" level="0" text="Timer" entryID="timer_edit"><screen module="TimerEdit" screen="TimerEditList" /></item>
			<item weight="100" level="0" text="PowerTimers" entryID="powertimer_edit"><screen module="PowerTimerEdit" screen="PowerTimerEditList" /></item>
		</menu>

		<!-- Menu / Scart (if enabled in config) -->
		<item level="1" text="VCR scart" entryID="scart_switch" configcondition="config.usage.show_vcr_scart" requires="ScartSwitch"><code>self.session.scart.VCRSbChanged(3)</code></item>

		<!-- Menu / Information -->
		<menu level="0" text="Information" entryID="info_screen">
			<id val="information" />
			<item level="0" text="About" entryID="about_screen"><screen module="About" screen="About"/></item>
			<item level="0" text="Devices" entryID="device_screen"><screen module="About" screen="Devices"/></item>
			<item level="0" text="Memory" entryID="device_screen"><screen module="About" screen="SystemMemoryInfo"/></item>
			<item level="0" text="Network" entryID="device_screen"><screen module="About" screen="SystemNetworkInfo"/></item>
			<item level="1" text="Service" entryID="service_info_screen"><screen module="ServiceInfo" screen="ServiceInfo"/></item>
			<item level="1" text="Streaming clients info" entryID="streaming_clients_info_screen"><screen module="StreamingClientsInfo"/></item>
		</menu>

		<!-- Menu / Plugin -->
		<item level="1" text="Plugins" entryID="plugin_selection"><screen module="PluginBrowser" screen="PluginBrowser" /></item>

		<!-- Menu / Setup -->
		<menu level="0" text="Setup" flushConfigOnClose="1" entryID="setup_selection" >
			<id val="setup" />
			<!-- Menu / Settings / Video Menu -->
			<menu weight="0" level="0" text="Video" entryID="video_menu">
				<id val="video_menu" />
				<item weight="0" text="Video settings" entryID="av_setup"><screen module="VideoMode" screen="VideoSetup" /></item>
				<item level="0" text="HDMI CEC" entryID="hdmicec" requires="HDMICEC">
<code>
from Plugins.SystemPlugins.HdmiCEC.plugin import HdmiCECSetupScreen
self.session.open(HdmiCECSetupScreen)
</code>
				</item>
			</menu>

			<!-- Menu / Settings / Audio Menu -->
			<menu weight="5" level="0" text="Audio" entryID="audio_menu">
				<id val="audio_menu" />
				<item weight="0" text="Audio settings" entryID="av_setup"><screen module="VideoMode" screen="AudioSetup" /></item>
				<item level="0" text="HDMI CEC" entryID="hdmicec" requires="HDMICEC">
<code>
from Plugins.SystemPlugins.HdmiCEC.plugin import HdmiCECSetupScreen
self.session.open(HdmiCECSetupScreen)
</code>
				</item>
				<item level="2" entryID="subtitle_setup"><setup id="subtitlesetup" /></item>
			</menu>

			<!-- Menu / Settings / Gui Menu -->
			<menu weight="10" level="0" text="Graphical UI" entryID="gui_menu">
				<id val="gui_menu" />
				<item level="0" text="Skin setup" entryID="skin_setup"><screen module="SkinSelector" screen="SkinSelector"/></item>
				<item level="0" text="Language" entryID="language_setup"><screen module="LanguageSelection" /></item>
				<item level="0" entryID="user_interface"><setup id="userinterface" /></item>
				<item level="0" entryID="channelselection_setup"><setup id="channelselection" /></item>
				<item level="1" entryID="autolanguage_setup"><setup id="autolanguagesetup" /></item>
				<item level="2" text="Position setup" entryID="osdsetup" requires="CanChangeOsdPosition"><screen module="UserInterfacePositioner" screen="UserInterfacePositioner"/></item>
				<item level="2" text="3D setup" entryID="osd3dsetup" requires="CanChange3DOsd"><screen module="UserInterfacePositioner" screen="OSD3DSetupScreen"/></item>
				<!--item level="2" entryID="settings_overlan_setup"><setup id="settingsoverlansetup" /></item-->
			</menu>

			<!-- Aufnahme / Timeshift Menu -->
			<menu weight="11" level="2" text="Recording / Playback" entryID="record_menu">
				<id val="record_menu" />
				<item level="0" text="Recording settings" entryID="recording_setup"><screen module="Recordings" screen="RecordingSettings" /></item>
				<item level="1" entryID="rfmod_setup" requires="RfModulator"><setup id="RFmod"/></item>
				<item level="0" text="Timeshift settings" entryID="timshift_setup"><screen module="Timershift" screen="TimeshiftSettings" /></item>
			</menu>

			<!-- Menu / Settings / EPG Menu -->
			<menu weight="15" level="2" text="EPG" entryID="epg_menu">
					<id val="epg" />
					<item level="0" entryID="epg_setup"><setup id="epgsettings" /></item>
					<menu level="2" text="Load/Save/Delete" entryID="epgloadsave_menu">
						<id val="epgloadsave_menu" />
						<item level="0" entryID="saveepgcache" text="Save EPG">
<code>
from Components.EpgLoadSave import EpgSaveMsg
def msgClosed(ret):
	if ret:
		from enigma import eEPGCache
		epgcache = eEPGCache.getInstance()
		epgcache.save()
self.session.openWithCallback(msgClosed, EpgSaveMsg)
</code>
						</item>
						<item level="0" entryID="loadepgcache" text="Load EPG">
<code>
from Components.EpgLoadSave import EpgLoadMsg
def msgClosed(ret):
	if ret:
		from enigma import eEPGCache
		epgcache = eEPGCache.getInstance()
		epgcache.load()
self.session.openWithCallback(msgClosed, EpgLoadMsg)
</code>
						</item>
						<item level="0" entryID="deleteepgcache" text="Delete EPG">
<code>
from Components.EpgLoadSave import EpgDeleteMsg
def msgClosed(ret):
	if ret:
		import os
		from Components.config import config
		if os.path.exists(config.misc.epgcache_filename.value):
			os.remove(config.misc.epgcache_filename.value)
		from enigma import eEPGCache
		epgcache = eEPGCache.getInstance()
		epgcache.flushEPG()
self.session.openWithCallback(msgClosed, EpgDeleteMsg)
</code>
						</item>

					</menu>
					<item level="2" entryID="setup_epgmulti"><setup id="epgmulti" /></item>
					<item level="2" entryID="setup_epgenhanced"><setup id="epgenhanced" /></item>
					<item level="2" entryID="setup_epginfobar"><setup id="epginfobar" /></item>
					<item level="2" entryID="setup_epginfobargraphical"><setup id="epginfobargraphical" /></item>
					<item level="2" entryID="setup_epggraphical"><setup id="epggraphical" /></item>
				</menu>

			<!-- Menu / Settings / Devices Menu -->
			<menu weight="20" text="Devices" entryID="devices_menu">
				<id val="devices_menu" />
				<!-- Menu / Settings / Devices / Harddisk -->
				<menu weight="5" level="0" text="Harddisk" entryID="hardisk_selection" requires="Harddisk">
					<id val="harddisk" />
					<item level="1" entryID="harddisk_setup"><setup id="harddisk"/></item>
					<item level="0" text="Initialization" entryID="harddisk_init"><screen module="HarddiskSetup" screen="HarddiskSelection"/></item>
					<item level="0" text="Filesystem check" entryID="harddisk_check"><screen module="HarddiskSetup" screen="HarddiskFsckSelection"/></item>
					<item level="0" text="Convert ext3 filesystem to ext4" entryID="harddisk_convert" requires="ext4"><screen module="HarddiskSetup" screen="HarddiskConvertExt4Selection"/></item>
				</menu>

				<!-- Menu / Settings / Devices / Network -->
				<menu level="1" text="Network" entryID="network_menu">
					<id val="network" />
					<item level="0" text="Device setup" entryID="device_setup"><screen module="NetworkSetup" screen="NetworkAdapterSelection"/></item>
					<item level="1" text="Mounts setup" entryID="netmounts_setup"><screen module="NetworkSetup" screen="NetworkMountsMenu"/></item>
					<item level="2" text="AFP setup" entryID="netafp_setup"><screen module="NetworkSetup" screen="NetworkAfp"/></item>
					<item level="2" text="FTP setup" entryID="netftp_setup"><screen module="NetworkSetup" screen="NetworkFtp"/></item>
					<item level="2" text="Inadyn setup" entryID="Inadyn_setup"><screen module="NetworkSetup" screen="NetworkInadyn"/></item>
					<item level="2" text="MiniDLNA setup" entryID="netushare_setup"><screen module="NetworkSetup" screen="NetworkMiniDLNA"/></item>
					<item level="2" text="NFS setup" entryID="netnfs_setup"><screen module="NetworkSetup" screen="NetworkNfs"/></item>
					<item level="2" text="OpenVPN setup" entryID="netvpn_setup"><screen module="NetworkSetup" screen="NetworkOpenvpn"/></item>
					<!--item level="2" text="Remote Tuner Server Setup" entryID="netrts_setup"><screen module="NetworkSetup" screen="RemoteTunerServer"/></item-->
					<item level="2" text="SABnzbd setup" entryID="netsabnzbd_setup" requires="SABSetup">
<code>
from Plugins.SystemPlugins.SABnzbd.plugin import SABnzbdSetupScreen
self.session.open(SABnzbdSetupScreen)
</code>
					</item>
					<item level="2" text="Samba setup" entryID="netsmba_setup"><screen module="NetworkSetup" screen="NetworkSamba"/></item>
					<item level="2" text="Telnet setup" entryID="nettelnet_setup"><screen module="NetworkSetup" screen="NetworkTelnet"/></item>
					<item level="2" text="uShare setup" entryID="netushare_setup"><screen module="NetworkSetup" screen="NetworkuShare"/></item>
				</menu>

				<!-- Menu / Settings / Devices / Softcam CI Menu -->
				<menu weight="25" text="SoftCam / CI" entryID="cam_setup">
					<id val="cam" />
					<item weight="1" level="2" entryID="softcam_setup"><setup id="softcamsetup" /></item>
					<item weight="0" level="1" text="Basic settings" entryID="ci_setup"><screen module="Ci" screen="CISetup" /></item>
					<item weight="1" level="1" text="Common Interface" entryID="ci_setup"><screen module="Ci" screen="CiSelection" /></item>
					<!--item weight="10" level="1" text="Common interface PIN Setup" entryID="ci_setup"><screen module="Ci" screen="CiDefaultPinSetup" /></item-->
					<item weight="11" level="2" text="CCcam info" entryID="cccaminfo" requires="CCcamInstalled"><screen module="CCcamInfo" screen="CCcamInfoMain" /></item>
					<item weight="11" level="2" text="OScam info" entryID="oscaminfo" requires="OScamInstalled"><screen module="OScamInfo" screen="OscamInfoMenu" /></item>
					<item weight="12" level="2" text="CIHelper Setup" entryID="ci_setup" requires="CIHelper"><screen module="Ci" screen="CIHelper" /></item>
				</menu>

				<!-- Menu / Settings / Devices / Remote -->
				<menu weight="25" text="Remote Control" entryID="remote_menu">
					<id val="remote_menu" />
					<item level="0" entryID="remote_setup"><setup id="remotesetup"/></item>
					<item level="0" entryID="hotkey_setup" text="HotKey Settings"><screen module="Hotkey" screen="HotkeySetup" /></item>
				</menu>

				<!-- Menu / Settings / Frontpanel Menu -->
				<menu weight="15" level="0" text="Frontpanel" entryID="fp_menu">
					<id val="fp_menu" />
					<menu level="0" text="Display" entryID="display_selection" requires="Display">
						<id val="display" />
						<item level="0" entryID="displaysetup"><setup id="display" /></item>
						<!--item requires="OledDisplay" level="0" text="VFD Skin Selector" entryID="vfd_skin"><screen module="VfdSkinSelector" screen="VFDSkinSelector"/></item-->
						<item requires="LCDSKINSetup" level="0" text="VFD Skin Selector" entryID="vfd_skin"><screen module="VfdSkinSelector" screen="VFDSkinSelector"/></item>
					</menu>
				</menu>

				<!-- Menu / Settings / Devices / Input Devices -->
				<item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item>

				<!-- Menu / Settings / Devices / Keyboard -->
				<item text="Keyboard"><setup id="keyboard" /></item>
			</menu>

			<!-- Menu / Settings / Software -->
			<menu weight="25" level="0" text="Software" entryID="software_menu">
				<id val="software_menu" />
				<item level="1" entryID="onlineupdate_setup"><setup id="softwareupdate"/></item>
			</menu>

			<!-- Menu / Setup / System-->
			<menu weight="30" level="0" text="System" entryID="system_selection">
				<id val="system" />
				<!--item level="0" weight="15" text="HotKey Settings" entryID="hotkey_setup"><screen module="Hotkey" screen="HotkeySetup" /></item-->
				<item level="0" entryID="usage_setup"><setup id="usage" /></item>
				<menu level="2" text="Logs" entryID="logs_setup">
					<id val="logs_menu" />
					<item level="2" entryID="logs_setup"><setup id="logs" /></item>
					<item level="2" text="Logs manager" entryID="logs_man"><screen module="LogManager" screen="LogManager"/></item>
				</menu>
				<menu level="2" text="Recording" entryID="record_menu">
					<id val="record_menu" />
					<item level="0" text="Recording settings" entryID="recording_setup"><screen module="Recordings" screen="RecordingSettings" /></item>
					<item level="1" entryID="rfmod_setup" requires="RfModulator"><setup id="RFmod"/></item>
					<item level="0" text="Timeshift settings" entryID="timshift_setup"><screen module="Timershift" screen="TimeshiftSettings" /></item>
				</menu>
				<menu level="1" text="Network" entryID="network_menu">
					<id val="network" />
					<item level="0" text="Device setup" entryID="device_setup"><screen module="NetworkSetup" screen="NetworkAdapterSelection"/></item>
					<item level="1" text="Mounts setup" entryID="netmounts_setup"><screen module="NetworkSetup" screen="NetworkMountsMenu"/></item>
					<item level="2" text="AFP setup" entryID="netafp_setup"><screen module="NetworkSetup" screen="NetworkAfp"/></item>
					<item level="2" text="FTP setup" entryID="netftp_setup"><screen module="NetworkSetup" screen="NetworkFtp"/></item>
					<item level="2" text="Inadyn setup" entryID="Inadyn_setup"><screen module="NetworkSetup" screen="NetworkInadyn"/></item>
					<item level="2" text="MiniDLNA setup" entryID="netushare_setup"><screen module="NetworkSetup" screen="NetworkMiniDLNA"/></item>
					<item level="2" text="NFS setup" entryID="netnfs_setup"><screen module="NetworkSetup" screen="NetworkNfs"/></item>
					<item level="2" text="OpenVPN setup" entryID="netvpn_setup"><screen module="NetworkSetup" screen="NetworkOpenvpn"/></item>
					<!--item level="2" text="Remote Tuner Server Setup" entryID="netrts_setup"><screen module="NetworkSetup" screen="RemoteTunerServer"/></item-->
					<item level="2" text="SABnzbd setup" entryID="netsabnzbd_setup" requires="SABSetup">
						<code>
from Plugins.SystemPlugins.SABnzbd.plugin import SABnzbdSetupScreen
self.session.open(SABnzbdSetupScreen)
						</code>
					</item>
					<item level="2" text="Samba setup" entryID="netsmba_setup"><screen module="NetworkSetup" screen="NetworkSamba"/></item>
					<item level="2" text="Telnet setup" entryID="nettelnet_setup"><screen module="NetworkSetup" screen="NetworkTelnet"/></item>
					<item level="2" text="uShare setup" entryID="netushare_setup"><screen module="NetworkSetup" screen="NetworkuShare"/></item>
				</menu>
				<item level="0" entryID="dvdplayer_setup"><setup id="dvdplayer" /></item>
				<item level="0" entryID="time_setup"><setup id="time"/></item>
				<!-- Menu / Settings / Parental Control -->
				<item level="0" text="Parental control" entryID="parental_setup"><screen module="ParentalControlSetup" screen="ParentalControlSetup" /></item>

				<!-- Menu / Settings / Factory reset -->
				<item level="0" text="Factory reset" entryID="factory_reset">
				<code>
from Screens.FactoryReset import FactoryReset
def msgClosed(ret):
	if ret:
		from os import system, _exit
		system("rm -R /etc/enigma2")
		system("cp -R /usr/share/enigma2/defaults /etc/enigma2")
		system("/usr/bin/showiframe /usr/share/backdrop.mvi")
		_exit(0)
self.session.openWithCallback(msgClosed, FactoryReset)
</code>
				</item>
			</menu>

			<!-- Menu / Settings / Service Serching -->
			<menu weight="35" level="0" text="Service searching" entryID="service_searching_selection">
				<id val="scan" />
				<item weight="10" text="Tuner configuration" entryID="tuner_setup"><screen module="Satconfig" screen="NimSelection" /></item>
				<item weight="20" text="Automatic scan" entryID="auto_scan"><screen module="ScanSetup" screen="ScanSimple" /></item>
				<item weight="30" text="Manual scan" entryID="manual_scan"><screen module="ScanSetup" /></item>
				<item weight="35" text="Satfinder" entryID="satfinder" requires="Satfinder"><plugin system="Satfinder" screen="Satfinder" /></item>
				<item weight="40" text="Remote Tuner Server Setup" entryID="netrts_setup"><screen module="NetworkSetup" screen="RemoteTunerServer"/></item>
			</menu>
		</menu>

		<!-- Menu / Standby -->
		<menu text="Standby / Restart" entryID="standby_restart_list">
			<id val="shutdown" />
			<item text="Deep Standby" requires="DeepstandbySupport" entryID="deep_standby">
<code>
from Screens.Standby import TryQuitMainloop
from Screens.MessageBox import MessageBox
recordings = self.session.nav.getRecordingsCheckBeforeActivateDeepStandby()
if recordings:
	self.session.openWithCallback(self.gotoStandby,MessageBox,_("PowerOff while Recording in progress!\nEntering standby, after recording the box will shutdown."), type = MessageBox.TYPE_INFO, timeout = 10)
else:
	self.session.open(TryQuitMainloop, 1)
</code>
			</item>
			<item weight="5" level="0" text="Shutdown" requires="!DeepstandbySupport" entryID="deep_standby"><screen module="Standby" screen="TryQuitMainloop">1</screen></item>
			<item text="WOL Standby" requires="GBWOL" entryID="deep_standby">
<code>
from Screens.Standby import TryQuitMainloop
from Screens.MessageBox import MessageBox
recordings = self.session.nav.getRecordingsCheckBeforeActivateDeepStandby()
if recordings:
	self.session.openWithCallback(self.gotoStandby,MessageBox,_("PowerOff while Recording in progress!\nEntering standby, after recording the box will shutdown."), type = MessageBox.TYPE_INFO, timeout = 10)
else:
	self.session.open(TryQuitMainloop, 45)
</code>
			</item>
			<item text="Standby" entryID="standby"><screen module="Standby" screen="Standby"/></item>
			<item text="Restart" entryID="restart"><screen module="Standby" screen="TryQuitMainloop">2</screen></item>
			<item text="SleepTimer" entryID="sleep" level="0" requires="DeepstandbySupport" ><screen module="SleepTimerEdit" screen="SleepTimerEdit" /></item>
			<item text="MultiBoot Selector" level="0" requires="HaveMultiBootHD" entryID="deep_standby"><screen module="MultiBootStartup" screen="MultiBootStartup" /></item>
			<item text="MultiBoot Selector" level="0" requires="HaveMultiBootXC" entryID="deep_standby"><screen module="MultiBootStartupXC" screen="MultiBootStartup" /></item>
			<item text="MultiBoot Selector" level="0" requires="HaveMultiBootGB" entryID="deep_standby"><screen module="MultiBootStartupGB" screen="MultiBootStartup" /></item>
			<item text="MultiBoot Selector" level="0" requires="HaveMultiBootCY" entryID="deep_standby"><screen module="MultiBootStartupCY" screen="MultiBootStartup" /></item>
			<item text="Recovery Mode" requires="RecoveryMode" entryID="maintenance_mode"><screen module="Standby" screen="TryQuitMainloop">16</screen></item>
			<item text="PowerTimer" entryID="powertimer_edit"><screen module="PowerTimerEdit" screen="PowerTimerEditList" /></item>
			<item text="Restart enigma" entryID="restart_enigma"><screen module="Standby" screen="TryQuitMainloop">3</screen></item>
			<item text="Deep standby" requires="!DeepstandbySupport" entryID="deep_standby"><screen module="Standby" screen="TryQuitMainloop">1</screen></item>
		</menu>
</menu>

