diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-03-31 15:51:31 +0200 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-03-31 15:51:31 +0200 |
| commit | bce53d4a67d1655a496eebe5912c8573e880114e (patch) | |
| tree | 9b410fbcaf0f4a22f1cf3489b635e3e94e47a6d8 /lib/python/Screens/LocationBox.py | |
| parent | 166db5a9c9222c82939eede51d964c706039ebe8 (diff) | |
| parent | 54475ce18e43482b2ec1a150f7fa07c3464ec6d2 (diff) | |
| download | enigma2-bce53d4a67d1655a496eebe5912c8573e880114e.tar.gz enigma2-bce53d4a67d1655a496eebe5912c8573e880114e.zip | |
Merge commit 'origin/master' into tmbinc/FixTimingBugs
Diffstat (limited to 'lib/python/Screens/LocationBox.py')
| -rw-r--r-- | lib/python/Screens/LocationBox.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/python/Screens/LocationBox.py b/lib/python/Screens/LocationBox.py index fa47b1f2..61d7105d 100644 --- a/lib/python/Screens/LocationBox.py +++ b/lib/python/Screens/LocationBox.py @@ -163,11 +163,11 @@ class LocationBox(Screen, NumericalTextInput, HelpableScreen): }) # Run some functions when shown - self.onShown.extend([ + self.onShown.extend(( boundFunction(self.setTitle, windowTitle), self.updateTarget, self.showHideRename, - ]) + )) self.onLayoutFinish.append(self.switchToFileListOnStart) @@ -241,7 +241,7 @@ class LocationBox(Screen, NumericalTextInput, HelpableScreen): ) def createDirCallback(self, res): - if res is not None and len(res): + if res: path = os.path.join(self["filelist"].current_directory, res) if not pathExists(path): if not createDir(path): @@ -454,7 +454,7 @@ class LocationBox(Screen, NumericalTextInput, HelpableScreen): def selectByStart(self): # Don't do anything on initial call - if not len(self.quickselect): + if not self.quickselect: return # Don't select if no dir @@ -503,16 +503,12 @@ class LocationBox(Screen, NumericalTextInput, HelpableScreen): return str(type(self)) + "(" + self.text + ")" class MovieLocationBox(LocationBox): - skinName = "LocationBox" - def __init__(self, session, text, dir, minFree = None): inhibitDirs = ["/bin", "/boot", "/dev", "/etc", "/lib", "/proc", "/sbin", "/sys", "/usr", "/var"] LocationBox.__init__(self, session, text = text, currDir = dir, bookmarks = config.movielist.videodirs, autoAdd = True, editDir = True, inhibitDirs = inhibitDirs, minFree = minFree) + self.skinName = "LocationBox" class TimeshiftLocationBox(LocationBox): - - skinName = "LocationBox" # XXX: though we could use a custom skin or inherit the hardcoded one we stick with the original :-) - def __init__(self, session): inhibitDirs = ["/bin", "/boot", "/dev", "/etc", "/lib", "/proc", "/sbin", "/sys", "/usr", "/var"] LocationBox.__init__( @@ -524,8 +520,9 @@ class TimeshiftLocationBox(LocationBox): autoAdd = True, editDir = True, inhibitDirs = inhibitDirs, - minFree = 1024 # XXX: the same requirement is hardcoded in servicedvb.cpp + minFree = 1024 # the same requirement is hardcoded in servicedvb.cpp ) + self.skinName = "LocationBox" def cancel(self): config.usage.timeshift_path.cancel() |
