fix for unused buttons on bottom row
[enigma2.git] / lib / python / Screens / DefaultWizard.py
index ec45a28f80e87b52c57697bfe914f082e02882f6..73b07acf5b07c72caa136fee76e2068ffd297c7d 100644 (file)
@@ -1,13 +1,13 @@
 from Wizard import wizardManager
 from Screens.WizardLanguage import WizardLanguage
-from Tools.Directories import resolveFilename, SCOPE_DEFAULTDIR, SCOPE_DEFAULTPARTITIONMOUNTDIR, SCOPE_DEFAULTPARTITION
+from Tools.Directories import pathExists, resolveFilename, SCOPE_DEFAULTDIR, SCOPE_DEFAULTPARTITIONMOUNTDIR, SCOPE_DEFAULTPARTITION
 
 from Components.Pixmap import Pixmap, MovingPixmap
 from Components.config import config, ConfigBoolean, configfile, ConfigYesNo, getConfigListEntry
 from Components.DreamInfoHandler import DreamInfoHandler
 from Components.PluginComponent import plugins
 from Plugins.Plugin import PluginDescriptor
-from os import system as os_system, path as os_path
+from os import system as os_system, path as os_path, mkdir
 
 config.misc.defaultchosen = ConfigBoolean(default = True)
 
@@ -59,10 +59,11 @@ class DefaultWizard(WizardLanguage, DreamInfoHandler):
                for x in range(len(self.packagesConfig)):
                        if self.packagesConfig[x].value:
                                self.indexList.append(x)
-               
+
 class DreamPackageWizard(DefaultWizard):
        def __init__(self, session, packagefile, silent = False):
-               os_system("mkdir /tmp/package")
+               if not pathExists("/tmp/package"):
+                       mkdir("/tmp/package")
                os_system("tar xpzf %s -C /tmp/package" % packagefile)
                self.packagefile = packagefile
                DefaultWizard.__init__(self, session, silent)
@@ -95,8 +96,6 @@ def filescan_open(list, session, **kwargs):
 
 def filescan(**kwargs):
        from Components.Scanner import Scanner, ScanPath
-       from mimetypes import add_type
-       add_type("application/x-dream-package", "dmpkg")
        return \
                Scanner(mimetypes = ["application/x-dream-package"], 
                        paths_to_scan = 
@@ -105,7 +104,7 @@ def filescan(**kwargs):
                                        ScanPath(path = "", with_subdirs = False), 
                                ], 
                        name = "Dream-Package", 
-                       description = "Install settings, skins, software..."
+                       description = _("Install settings, skins, software...")
                        openfnc = filescan_open, )
 
 print "add dreampackage scanner plugin"