X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a9f9792e9d271864182d32bfff58795690084cab..ef4faf6f9fc8840b36b5f25206fd0722d5e36e85:/lib/python/Components/DiskInfo.py diff --git a/lib/python/Components/DiskInfo.py b/lib/python/Components/DiskInfo.py index 68674e99..1278ff99 100644 --- a/lib/python/Components/DiskInfo.py +++ b/lib/python/Components/DiskInfo.py @@ -6,17 +6,18 @@ from enigma import eLabel # TODO: Harddisk.py has similiar functions, but only similiar. # fix this to use same code -class DiskInfo(GUIComponent, VariableText): +class DiskInfo(VariableText, GUIComponent): FREE = 0 USED = 1 SIZE = 2 - def __init__(self, path, type): + def __init__(self, path, type, update = True): GUIComponent.__init__(self) VariableText.__init__(self) self.type = type self.path = path - self.update() + if update: + self.update() def update(self): try: @@ -28,5 +29,4 @@ class DiskInfo(GUIComponent, VariableText): free = stat.f_bfree / 1000 * stat.f_bsize / 1000 self.setText(("%dMB " + _("free diskspace")) % (free)) - def createWidget(self, parent): - return eLabel(parent) + GUI_WIDGET = eLabel