+ self.skinName = "LocationBox"
+
+class TimeshiftLocationBox(LocationBox):
+ 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 # the same requirement is hardcoded in servicedvb.cpp
+ )
+ self.skinName = "LocationBox"
+
+ 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)
+