aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/LocationBox.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2008-11-17 14:05:17 +0100
committerghost <andreas.monzner@multimedia-labs.de>2008-11-17 14:05:17 +0100
commit8cf7cff9fc9cde4d7add449478b8b35103325295 (patch)
tree45b2ddc136159655b2157eb047a620afca22fa5a /lib/python/Screens/LocationBox.py
parent2a7b743b84bd9ef380af30b0f9f260bf386eed9a (diff)
parentb19b6c15482681e331f346acb56b1566102e1418 (diff)
downloadenigma2-8cf7cff9fc9cde4d7add449478b8b35103325295.tar.gz
enigma2-8cf7cff9fc9cde4d7add449478b8b35103325295.zip
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Screens/LocationBox.py')
-rw-r--r--lib/python/Screens/LocationBox.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/python/Screens/LocationBox.py b/lib/python/Screens/LocationBox.py
index 7cd6cbf9..68d4f772 100644
--- a/lib/python/Screens/LocationBox.py
+++ b/lib/python/Screens/LocationBox.py
@@ -503,3 +503,32 @@ class MovieLocationBox(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)
+
+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__(
+ self,
+ session,
+ text = _("Where to save temporary timeshift recordings?"),
+ currDir = config.usage.timeshift_path.value,
+ bookmarks = config.usage.allowed_timeshift_paths,
+ autoAdd = True,
+ editDir = True,
+ inhibitDirs = inhibitDirs,
+ minFree = 1024 # XXX: the same requirement is hardcoded in servicedvb.cpp
+ )
+
+ def cancel(self):
+ config.usage.timeshift_path.cancel()
+ LocationBox.cancel(self)
+
+ def selectConfirmed(self, ret):
+ if ret:
+ config.usage.timeshift_path.value = self.getPreferredFolder()
+ config.usage.timeshift_path.save()
+ LocationBox.selectConfirmed(self, ret)
+