X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FDiskInfo.py;h=0b7e0bcbdaaf16f6299e7d8309ee1f17921b34f7;hb=c2b4ddf8b22ac38d3842695f01d95326566b5a23;hp=6f16b053866146fe4d65f62c3ab5ec57fdfefee6;hpb=4cc1f7a05166715c19c965e3bbbe74a43835a754;p=vuplus_dvbapp diff --git a/lib/python/Components/DiskInfo.py b/lib/python/Components/DiskInfo.py index 6f16b05..0b7e0bc 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: @@ -26,7 +27,6 @@ class DiskInfo(GUIComponent, VariableText): if self.type == self.FREE: free = stat.f_bfree / 1000 * stat.f_bsize / 1000 - self.setText("%dMB " + _("free diskspace") % (free)) + self.setText(("%d MB " + _("free diskspace")) % (free)) - def createWidget(self, parent): - return eLabel(parent) + GUI_WIDGET = eLabel