add Factory reset
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Mar 2008 01:09:24 +0000 (01:09 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 27 Mar 2008 01:09:24 +0000 (01:09 +0000)
data/menu.xml

index cc0d410f593bc76a1752e335c30cdbc9f87c0df4..fea00c0b1a501d405e1e14ae22010e508a8b7ea7 100644 (file)
                        </menu>
                        <item level="1" text="Common Interface" entryID="ci_setup" requires="CommonInterface"><screen module="Ci" screen="CiSelection" /></item>
                        <item level="0" text="Parental control" entryID="parental_setup"><screen module="ParentalControlSetup" screen="ParentalControlSetup" /></item>
                        </menu>
                        <item level="1" text="Common Interface" entryID="ci_setup" requires="CommonInterface"><screen module="Ci" screen="CiSelection" /></item>
                        <item level="0" text="Parental control" entryID="parental_setup"><screen module="ParentalControlSetup" screen="ParentalControlSetup" /></item>
-                       <item level="0" text="Startwizard" entryID="startwizzard"><screen module="StartWizard" screen="StartWizard" /></item>
+                       <!--item level="0" text="Startwizard" entryID="startwizzard"><screen module="StartWizard" screen="StartWizard" /></item-->
+                       <item level="0" text="Factoryreset" entryID="factory_reset">
+<code>
+from Screens.MessageBox import MessageBox
+def msgClosed(ret):
+       if ret:
+               from os import system, _exit
+               system("rm -R /etc/enigma2")
+               system("cp -R /usr/share/enigma2/defaults /etc/enigma2")
+               _exit(0)
+
+self.session.openWithCallback(msgClosed, MessageBox, _("When you do a factory reset, you will lose ALL your configuration data\n"
+       "(including bouquets, services, satellite data ...)\n"
+       "After completion of factory reset, your receiver will restart automatically!\n\n"
+       "Really do a factory reset?"), MessageBox.TYPE_YESNO)
+</code></item>
                        <!--<item text="Parental Control"><setup id="parental" /></item>-->
                        <!--<item text="Expert -disabled-"><setup id="expert" /></item>-->
                </menu>
                        <!--<item text="Parental Control"><setup id="parental" /></item>-->
                        <!--<item text="Expert -disabled-"><setup id="expert" /></item>-->
                </menu>