Merge branch 'master' of git.opendreambox.org:/git/enigma2
authorFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Feb 2009 21:18:33 +0000 (22:18 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Sun, 15 Feb 2009 21:18:33 +0000 (22:18 +0100)
data/menu.xml
lib/python/Components/EpgList.py
lib/python/Components/HelpMenuList.py
lib/python/Components/NimManager.py
lib/python/Components/TimerSanityCheck.py
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Screens/FactoryReset.py [new file with mode: 0644]
lib/python/Screens/Makefile.am
lib/python/Screens/TimerEdit.py
lib/python/Screens/VirtualKeyBoard.py

index 7dc764acf996c349a76b270cd3468922516cfd6d..56b3ee651c78e751aed6a5a0e3a1b1078379fb7f 100644 (file)
@@ -82,20 +82,17 @@ self.session.open(DefaultWizard, silent = False)
 </code>
                        </item>
                        <item level="0" text="Factory reset" entryID="factory_reset">
-<code>
-from Screens.MessageBox import MessageBox
+                               <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")
                _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>
+self.session.openWithCallback(msgClosed, FactoryReset)
+</code>
+                       </item>
                        <!--<item text="Parental Control"><setup id="parental" /></item>-->
                        <!--<item text="Expert -disabled-"><setup id="expert" /></item>-->
                </menu>
index 8bd8e75922ba83f8189f2ac8a492f7eb28164117..2494ca0808b30c30f11d9679dd0e3b58b1bae81e 100644 (file)
@@ -289,6 +289,7 @@ class EPGList(HTMLComponent, GUIComponent):
                        else:
                                assert(type == 0)
                                list.sort(key=lambda x: x[2])
+                       self.l.invalidate()
                        self.moveToEventId(event_id)
 
        def getSelectedEventId(self):
index 2a7bd9958de374a4d337cc7b8c49ce98b8b330b5..ddf871a7db4bbc4d21293f738ccf723ceec1e83d 100755 (executable)
@@ -7,7 +7,7 @@ from Tools.KeyBindings import queryKeyBinding, getKeyDescription
 # [ ( actionmap, context, [(action, help), (action, help), ...] ), (actionmap, ... ), ... ]
 
 class HelpMenuList(GUIComponent):
-       def __init__(self, list, callback):
+       def __init__(self, helplist, callback):
                GUIComponent.__init__(self)
                self.onSelChanged = [ ]
                self.l = eListboxPythonMultiContent()
@@ -15,7 +15,7 @@ class HelpMenuList(GUIComponent):
                self.extendedHelp = False
 
                l = [ ]
-               for (actionmap, context, actions) in list:
+               for (actionmap, context, actions) in helplist:
                        for (action, help) in actions:
                                entry = [ ]
 
index 4be10d53957536557d9ccaa5fcd484e231a0294e..6dc49dcf7fda217456adf1d69637ef3df65bf22a 100644 (file)
@@ -287,8 +287,8 @@ class SecConfigure:
                                                sec.setLNBSatCR(manufacturer.scr[product_name].index)
                                                sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000)
                                        elif currLnb.unicable.value == "unicable_lnb":
-                                               manufacturer_name = currLnb.unicableMatrixManufacturer.value
-                                               manufacturer = currLnb.unicableMatrix[manufacturer_name]
+                                               manufacturer_name = currLnb.unicableLnbManufacturer.value
+                                               manufacturer = currLnb.unicableLnb[manufacturer_name]
                                                product_name = manufacturer.product.value
                                                sec.setLNBSatCR(manufacturer.scr[product_name].index)
                                                sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000)
index cf02459de26f56e614f605736d2b2b0dcdfdfb46..cf50502215000653214a785bb87c31b1ba1c6f6f 100644 (file)
@@ -1,11 +1,12 @@
 import NavigationInstance
-from time import localtime
+from time import localtime, mktime, gmtime
 from ServiceReference import ServiceReference
 from enigma import iServiceInformation, eServiceCenter, eServiceReference
 
 class TimerSanityCheck:
        def __init__(self, timerlist, newtimer=None):
                print "sanitycheck"
+               self.localtimediff = 25*3600 - mktime(gmtime(25*3600))
                self.timerlist = timerlist
                self.newtimer = newtimer
                self.simultimer = []
@@ -70,6 +71,10 @@ class TimerSanityCheck:
                        rflags = ((rflags & 0x7F)>> 3)|((rflags & 0x07)<<4)
                        if rflags:
                                begin = self.newtimer.begin % 86400 # map to first day
+                               if (self.localtimediff > 0) and ((begin + self.localtimediff) > 86400):
+                                       rflags = ((rflags >> 1)& 0x3F)|((rflags << 6)& 0x40)
+                               elif (self.localtimediff < 0) and (begin < self.localtimediff):
+                                       rflags = ((rflags << 1)& 0x7E)|((rflags >> 6)& 0x01)
                                while rflags: # then arrange on the week
                                        if rflags & 1:
                                                self.rep_eventlist.append((begin, -1))
@@ -87,6 +92,10 @@ class TimerSanityCheck:
                                        rflags = timer.repeated
                                        rflags = ((rflags & 0x7F)>> 3)|((rflags & 0x07)<<4)
                                        begin = timer.begin % 86400 # map all to first day
+                                       if (self.localtimediff > 0) and ((begin + self.localtimediff) > 86400):
+                                               rflags = ((rflags >> 1)& 0x3F)|((rflags << 6)& 0x40)
+                                       elif (self.localtimediff < 0) and (begin < self.localtimediff):
+                                               rflags = ((rflags << 1)& 0x7E)|((rflags >> 6)& 0x01)
                                        while rflags:
                                                if rflags & 1:
                                                        self.rep_eventlist.append((begin, idx))
index 7ea32dfed264648d6ce287aabad1aca3b3322a45..660234f20e1be4949f073c5ac75f7efb1d6d2fb1 100644 (file)
@@ -2,8 +2,8 @@ from Tools.Directories import fileExists
 from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList
 
 class ConfigColor(ConfigSequence):
-       def __init__(self):
-               ConfigSequence.__init__(self, seperator = "#", limits = [(0,255),(0,255),(0,255)])
+       def __init__(self, default = [128,128,128]):
+               ConfigSequence.__init__(self, seperator = "#", limits = [(0,255),(0,255),(0,255)], default = default)
 
 class ConfigFilename(ConfigText):
        def __init__(self):
index 85d23284d453f7e99d271b1268c786909137684c..3215dbce3345fd3bf5cd02ba4d1e1d09e7f37ab5 100755 (executable)
@@ -18,7 +18,7 @@ from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixm
 from Components.SelectionList import SelectionList
 from Tools.Directories import fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
 from Tools.LoadPixmap import LoadPixmap
-from enigma import eTimer,  loadPNG, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont
+from enigma import eTimer, quitMainloop, RT_HALIGN_LEFT, RT_VALIGN_CENTER, eListboxPythonMultiContent, eListbox, gFont
 from cPickle import dump, load
 
 from os import path as os_path, system as os_system, unlink, stat, mkdir, popen, makedirs, listdir, access, rename, remove, W_OK, R_OK, F_OK
@@ -33,7 +33,6 @@ config.plugins.configurationbackup = ConfigSubsection()
 config.plugins.configurationbackup.backuplocation = ConfigText(default = '/media/hdd/', visible_width = 50, fixed_size = False)
 config.plugins.configurationbackup.backupdirs = ConfigLocations(default=['/etc/enigma2/', '/etc/network/interfaces', '/etc/wpa_supplicant.conf'])
 
-
 def write_cache(cache_file, cache_data):
        #Does a cPickle dump
        if not os_path.isdir( os_path.dirname(cache_file) ):
@@ -136,46 +135,48 @@ class UpdatePluginMenu(Screen):
                self.setTitle(_("Software manager..."))
                
        def go(self):
-               current = self["menu"].getCurrent()[0]
-               if self.menu == 0:
-                       if (current == "software-restore"):
-                               self.session.open(ImageWizard)
-                       elif (current == "software-update"):
-                               self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your Dreambox?")+"\n"+_("\nAfter pressing OK, please wait!"))
-                       elif (current == "advanced"):
-                               self.session.open(UpdatePluginMenu, 1)
-                       elif (current == "system-backup"):
-                               self.session.openWithCallback(self.backupDone,BackupScreen, runBackup = True)
-                       elif (current == "system-restore"):
-                               if os_path.exists(self.fullbackupfilename):
-                                       self.session.openWithCallback(self.startRestore, MessageBox, _("Are you sure you want to restore your Enigma2 backup?\nEnigma2 will restart after the restore"))
-                               else:   
-                                       self.session.open(MessageBox, _("Sorry no backups found!"), MessageBox.TYPE_INFO)
-               if self.menu == 1:
-                       if (current == "ipkg-manager"):
-                               self.session.open(PacketManager, self.skin_path)
-                       elif (current == "ipkg-source"):
-                               self.session.open(IPKGSource)
-                       elif (current == "ipkg-install"):
-                               try:
-                                       from Plugins.Extensions.MediaScanner.plugin import main
-                                       main(self.session)
-                               except:
-                                       self.session.open(MessageBox, _("Sorry MediaScanner is not installed!"), MessageBox.TYPE_INFO)
-                       elif (current == "backuplocation"):
-                               parts = [ (r.description, r.mountpoint, self.session) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)]
-                               for x in parts:
-                                       if not access(x[1], F_OK|R_OK|W_OK) or x[1] == '/':
-                                               parts.remove(x)
-                               for x in parts:
-                                       if x[1].startswith('/autofs/'):
-                                               parts.remove(x)                                 
-                               if len(parts):
-                                       self.session.openWithCallback(self.backuplocation_choosen, ChoiceBox, title = _("Please select medium to use as backup location"), list = parts)
-                       elif (current == "backupfiles"):
-                               self.session.openWithCallback(self.backupfiles_choosen,BackupSelection)
-                       elif (current == "advancedrestore"):
-                               self.session.open(RestoreMenu, self.skin_path)                  
+               current = self["menu"].getCurrent()
+               if current:
+                       current = current[0]
+                       if self.menu == 0:
+                               if (current == "software-restore"):
+                                       self.session.open(ImageWizard)
+                               elif (current == "software-update"):
+                                       self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your Dreambox?")+"\n"+_("\nAfter pressing OK, please wait!"))
+                               elif (current == "advanced"):
+                                       self.session.open(UpdatePluginMenu, 1)
+                               elif (current == "system-backup"):
+                                       self.session.openWithCallback(self.backupDone,BackupScreen, runBackup = True)
+                               elif (current == "system-restore"):
+                                       if os_path.exists(self.fullbackupfilename):
+                                               self.session.openWithCallback(self.startRestore, MessageBox, _("Are you sure you want to restore your Enigma2 backup?\nEnigma2 will restart after the restore"))
+                                       else:   
+                                               self.session.open(MessageBox, _("Sorry no backups found!"), MessageBox.TYPE_INFO)
+                       elif self.menu == 1:
+                               if (current == "ipkg-manager"):
+                                       self.session.open(PacketManager, self.skin_path)
+                               elif (current == "ipkg-source"):
+                                       self.session.open(IPKGSource)
+                               elif (current == "ipkg-install"):
+                                       try:
+                                               from Plugins.Extensions.MediaScanner.plugin import main
+                                               main(self.session)
+                                       except:
+                                               self.session.open(MessageBox, _("Sorry MediaScanner is not installed!"), MessageBox.TYPE_INFO)
+                               elif (current == "backuplocation"):
+                                       parts = [ (r.description, r.mountpoint, self.session) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)]
+                                       for x in parts:
+                                               if not access(x[1], F_OK|R_OK|W_OK) or x[1] == '/':
+                                                       parts.remove(x)
+                                       for x in parts:
+                                               if x[1].startswith('/autofs/'):
+                                                       parts.remove(x)
+                                       if len(parts):
+                                               self.session.openWithCallback(self.backuplocation_choosen, ChoiceBox, title = _("Please select medium to use as backup location"), list = parts)
+                               elif (current == "backupfiles"):
+                                       self.session.openWithCallback(self.backupfiles_choosen,BackupSelection)
+                               elif (current == "advancedrestore"):
+                                       self.session.open(RestoreMenu, self.skin_path)
 
        def backupfiles_choosen(self, ret):
                self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value )
@@ -231,13 +232,20 @@ class IPKGSource(Screen):
        def __init__(self, session, args = None):
                Screen.__init__(self, session)
                self.session = session
-               
-               fp = file('/etc/ipkg/official-feed.conf', 'r')
-               sources = fp.readlines()
-               fp.close()
-               
-               self["text"] = Input(sources[0], maxSize=False, type=Input.TEXT)
-                               
+
+               #FIXMEEEE add handling for more than one feed conf file!
+               text = ""
+               try:
+                       fp = file('/etc/ipkg/official-feed.conf', 'r')
+                       sources = fp.readlines()
+                       if sources:
+                               text = sources[0]
+                       fp.close()
+               except IOError:
+                       pass
+
+               self["text"] = Input(text, maxSize=False, type=Input.TEXT)
+
                self["actions"] = NumberActionMap(["WizardActions", "InputActions", "TextEntryActions", "KeyboardInputActions"], 
                {
                        "ok": self.go,
@@ -261,9 +269,11 @@ class IPKGSource(Screen):
                }, -1)
                
        def go(self):
-               fp = file('/etc/ipkg/official-feed.conf', 'w')
-               fp.write(self["text"].getText())
-               fp.close()
+               text = self["text"].getText()
+               if text:
+                       fp = file('/etc/ipkg/official-feed.conf', 'w')
+                       fp.write()
+                       fp.close()
                self.close()
                
        def keyLeft(self):
@@ -288,7 +298,6 @@ class IPKGSource(Screen):
                print "pressed", number
                self["text"].number(number)
 
-
 class PacketList(MenuList):
        def __init__(self, list, enableWrapAround=True):
                MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
@@ -342,7 +351,7 @@ class PacketManager(Screen):
                self.onShown.append(self.setWindowTitle)
                self.onLayoutFinish.append(self.rebuildList)
                self.onClose.append(self.cleanup)
-               
+
        def cleanup(self):
                self.ipkg.stop()
                if self.Console is not None:
@@ -373,20 +382,22 @@ class PacketManager(Screen):
                        self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
 
        def go(self, returnValue = None):
-               returnValue = self['list'].l.getCurrentSelection()[0]
-               self.cmdList = []
-               if returnValue[3] == 'installed':
-                       self.cmdList.append((IpkgComponent.CMD_REMOVE, { "package": returnValue[0] }))
-                       if len(self.cmdList):
-                               self.session.openWithCallback(self.runRemove, MessageBox, _("Do you want to remove the package:\n" + returnValue[0] + "\n" + self.oktext))
-               elif returnValue[3] == 'upgradeable':
-                       self.cmdList.append((IpkgComponent.CMD_INSTALL, { "package": returnValue[0] }))
-                       if len(self.cmdList):
-                               self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to upgrade the package:\n" + returnValue[0] + "\n" + self.oktext))
-               else:
-                       self.cmdList.append((IpkgComponent.CMD_INSTALL, { "package": returnValue[0] }))
-                       if len(self.cmdList):
-                               self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to install the package:\n" + returnValue[0] + "\n" + self.oktext))
+               cur = self['list'].l.getCurrentSelection()
+               if cur:
+                       returnValue = cur[0]
+                       self.cmdList = []
+                       if returnValue[3] == 'installed':
+                               self.cmdList.append((IpkgComponent.CMD_REMOVE, { "package": returnValue[0] }))
+                               if len(self.cmdList):
+                                       self.session.openWithCallback(self.runRemove, MessageBox, _("Do you want to remove the package:\n" + returnValue[0] + "\n" + self.oktext))
+                       elif returnValue[3] == 'upgradeable':
+                               self.cmdList.append((IpkgComponent.CMD_INSTALL, { "package": returnValue[0] }))
+                               if len(self.cmdList):
+                                       self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to upgrade the package:\n" + returnValue[0] + "\n" + self.oktext))
+                       else:
+                               self.cmdList.append((IpkgComponent.CMD_INSTALL, { "package": returnValue[0] }))
+                               if len(self.cmdList):
+                                       self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to install the package:\n" + returnValue[0] + "\n" + self.oktext))
 
        def runRemove(self, result):
                if result:
@@ -399,12 +410,15 @@ class PacketManager(Screen):
                if result is None:
                        return
                if result is False:
-                       entry = self['list'].l.getCurrentSelection()[0]
-                       item = self['list'].l.getCurrentSelectionIndex()
-                       self.list[item] = PacketEntryComponent([entry[0], entry[1], entry[2], 'installable'])
-                       self.cachelist[item] = [entry[0], entry[1], entry[2], 'installable']
-                       self['list'].l.setList(self.list)
-                       write_cache(self.cache_file, self.cachelist)
+                       cur = self['list'].l.getCurrentSelection()
+                       if cur:
+                               entry = cur[0]
+                               item = self['list'].l.getCurrentSelectionIndex()
+                               self.list[item] = self.buildEntryComponent(entry[0], entry[1], entry[2], 'installable')
+                               self.cachelist[item] = [entry[0], entry[1], entry[2], 'installable']
+                               self['list'].l.setList(self.list)
+                               write_cache(self.cache_file, self.cachelist)
+                               self.reloadPluginlist()
                if result:
                        quitMainloop(3)
 
@@ -419,12 +433,15 @@ class PacketManager(Screen):
                if result is None:
                        return
                if result is False:
-                       entry = self['list'].l.getCurrentSelection()[0]
-                       item = self['list'].l.getCurrentSelectionIndex()
-                       self.list[item] = PacketEntryComponent([entry[0], entry[1], entry[2], 'installed'])
-                       self.cachelist[item] = [entry[0], entry[1], entry[2], 'installed']
-                       self['list'].l.setList(self.list)
-                       write_cache(self.cache_file, self.cachelist)
+                       cur = self['list'].l.getCurrentSelection()
+                       if cur:
+                               entry = cur[0]
+                               item = self['list'].l.getCurrentSelectionIndex()
+                               self.list[item] = self.buildEntryComponent(entry[0], entry[1], entry[2], 'installed')
+                               self.cachelist[item] = [entry[0], entry[1], entry[2], 'installed']
+                               self['list'].l.setList(self.list)
+                               write_cache(self.cache_file, self.cachelist)
+                               self.reloadPluginlist()
                if result:
                        quitMainloop(3)
 
@@ -448,6 +465,8 @@ class PacketManager(Screen):
                        for x in result.splitlines():
                                split = x.split(' - ')
                                self.packetlist.append([split[0].strip(), split[1].strip(),split[2].strip()])
+               if not self.Console:
+                       self.Console = Console()
                cmd = "ipkg list_installed"
                self.Console.ePopen(cmd, self.IpkgListInstalled_Finished)
 
@@ -465,17 +484,23 @@ class PacketManager(Screen):
                res.append(MultiContentEntryText(pos=(5, 26), size=(440, 20), font=1, text=entry[2]))
                res.append(MultiContentEntryPixmapAlphaTest(pos=(445, 2), size=(48, 48), png = entry[4]))
                res.append(MultiContentEntryPixmapAlphaTest(pos=(5, 50), size=(510, 2), png = entry[5]))
-               
                return res
 
+       def buildEntryComponent(self, name, version, description, state):
+               divpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png"))
+               if state == 'installed':
+                       installedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png"))
+                       return(self.PacketEntryComponent([name, version, description, state, installedpng, divpng]))
+               elif state == 'upgradeable':
+                       upgradeablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgradeable.png"))
+                       return(self.PacketEntryComponent([name, version, description, state, upgradeablepng, divpng]))
+               else:
+                       installablepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png"))
+                       return(self.PacketEntryComponent([name, version, description, state, installablepng, divpng]))
 
        def buildPacketList(self):
                self.list = []
                self.cachelist = []
-               installedpng = loadPNG(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installed.png"))
-               upgradeablepng = loadPNG(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/upgradeable.png"))
-               installablepng = loadPNG(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/installable.png"))
-               divpng = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/div-h.png"))
 
                if self.cache_ttl > 0 and self.vc != 0:
                        print 'Loading packagelist cache from ',self.cache_file
@@ -483,12 +508,7 @@ class PacketManager(Screen):
                                self.cachelist = load_cache(self.cache_file)
                                if len(self.cachelist) > 0:
                                        for x in self.cachelist:
-                                               if x[3] == 'installed':
-                                                       self.list.append(self.PacketEntryComponent([x[0], x[1], x[2], x[3],installedpng,divpng]))
-                                               elif x[3] == 'upgradeable':
-                                                       self.list.append(self.PacketEntryComponent([x[0], x[1], x[2], x[3],upgradeablepng,divpng]))
-                                               else:
-                                                       self.list.append(self.PacketEntryComponent([x[0], x[1], x[2], x[3],installablepng,divpng]))
+                                               self.list.append(self.buildEntryComponent(x[0], x[1], x[2], x[3]))
                                        self['list'].l.setList(self.list)
                                        self["list"].instance.show()
                                        self.status.hide()
@@ -502,19 +522,21 @@ class PacketManager(Screen):
                                if self.installed_packetlist.has_key(x[0].strip()):
                                        if self.installed_packetlist[x[0].strip()] == x[1].strip():
                                                status = "installed"
-                                               self.list.append(self.PacketEntryComponent([x[0].strip(), x[1].strip(), x[2].strip(), status,installedpng,divpng]))
+                                               self.list.append(self.buildEntryComponent(x[0].strip(), x[1].strip(), x[2].strip(), status))
                                        else:
                                                status = "upgradeable"
-                                               self.list.append(self.PacketEntryComponent([x[0].strip(), x[1].strip(), x[2].strip(), status,upgradeablepng,divpng]))
+                                               self.list.append(self.buildEntryComponent(x[0].strip(), x[1].strip(), x[2].strip(), status))
                                else:
                                        status = "installable"
-                                       self.list.append(self.PacketEntryComponent([x[0].strip(), x[1].strip(), x[2].strip(), status,installablepng,divpng]))
+                                       self.list.append(self.buildEntryComponent(x[0].strip(), x[1].strip(), x[2].strip(), status))
                                self.cachelist.append([x[0].strip(), x[1].strip(), x[2].strip(), status])       
                        write_cache(self.cache_file, self.cachelist)
                        self['list'].l.setList(self.list)
                        self["list"].instance.show()
                        self.status.hide()
 
+       def reloadPluginlist(self):
+               plugins.readPluginList(resolveFilename(SCOPE_PLUGINS))
 
 class UpdatePlugin(Screen):
        skin = """
diff --git a/lib/python/Screens/FactoryReset.py b/lib/python/Screens/FactoryReset.py
new file mode 100644 (file)
index 0000000..ce5aaeb
--- /dev/null
@@ -0,0 +1,9 @@
+from Screens.MessageBox import MessageBox
+
+class FactoryReset(MessageBox):
+       def __init__(self, session):
+               MessageBox.__init__(self, session, _("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)
+               self.skinName = "MessageBox"
\ No newline at end of file
index 00204a94e26cc69f16727c0634c5843fd6f9667b..ca67f73db14d031394e0d5b8588f8f8952353494 100755 (executable)
@@ -14,5 +14,5 @@ install_PYTHON = \
        SubtitleDisplay.py SubservicesQuickzap.py ParentalControlSetup.py NumericalTextInputHelpDialog.py \
        SleepTimerEdit.py Ipkg.py RdsDisplay.py Globals.py DefaultWizard.py \
        SessionGlobals.py LocationBox.py WizardLanguage.py TaskView.py Rc.py VirtualKeyBoard.py \
-       TextBox.py
+       TextBox.py FactoryReset.py
 
index cdff4c5ba36f22fe803727d93a966694adb48e86..6499ef507202f1f1a8d4fb84a05f9300f0ead89a 100644 (file)
@@ -273,7 +273,7 @@ class TimerEditList(Screen):
                                        else:
                                                success = True
                        else:
-                               succsess = True
+                               success = True
                        if success:
                                print "Sanity check passed"
                                self.session.nav.RecordTimer.timeChanged(entry)
index 53970ab862ddf14f56d4d3a587ff447411e3a83a..5dc1a0905e90f57d36ced838cb54e464f02a1c3a 100755 (executable)
@@ -5,19 +5,10 @@ from Components.Label import Label
 from Components.Pixmap import Pixmap\r
 from Components.MenuList import MenuList\r
 from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest\r
-from enigma import eListboxPythonMultiContent, gFont, loadPNG, RT_HALIGN_CENTER, RT_VALIGN_CENTER\r
+from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_CENTER, RT_VALIGN_CENTER\r
 from Screen import Screen\r
 from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE\r
-\r
-key_backspace = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_backspace.png"))\r
-key_bg = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_bg.png"))\r
-key_clr = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_clr.png"))\r
-key_esc = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_esc.png"))\r
-key_ok = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_ok.png"))\r
-key_sel = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_sel.png"))\r
-key_shift = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_shift.png"))\r
-key_shift_sel = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_shift_sel.png"))\r
-key_space = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_space.png"))\r
+from Tools.LoadPixmap import LoadPixmap\r
 \r
 class VirtualKeyBoardList(MenuList):\r
        def __init__(self, list, enableWrapAround=False):\r
@@ -26,6 +17,16 @@ class VirtualKeyBoardList(MenuList):
                self.l.setItemHeight(45)\r
 \r
 def VirtualKeyBoardEntryComponent(keys, selectedKey,shiftMode=False):\r
+       key_backspace = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_backspace.png"))\r
+       key_bg = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_bg.png"))\r
+       key_clr = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_clr.png"))\r
+       key_esc = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_esc.png"))\r
+       key_ok = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_ok.png"))\r
+       key_sel = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_sel.png"))\r
+       key_shift = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_shift.png"))\r
+       key_shift_sel = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_shift_sel.png"))\r
+       key_space = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/vkey_space.png"))\r
+       \r
        res = [ (keys) ]\r
        \r
        x = 0\r
@@ -116,6 +117,7 @@ class VirtualKeyBoard(Screen):
                                [u"Q", u"W", u"E", u"R", u"T", u"Z", u"U", u"I", u"O", u"P", u"É", u"*"],\r
                                [u"A", u"S", u"D", u"F", u"G", u"H", u"J", u"K", u"L", u"Ö", u"Ä", u"'"],\r
                                [u">", u"Y", u"X", u"C", u"V", u"B", u"N", u"M", u";", u":", u"_", u"CLEAR"],\r
+\r
                                [u"SHIFT", u"SPACE", u"?", u"\\", u"Å", u"OK"]]\r
                else:\r
                        self.keys_list = [\r