import gtk import gobject from list import List class LibList(List): def __init__(self,data): List.__init__(self,data,"Library") self.pbar = gtk.ProgressBar() self.pbaralign = gtk.Alignment(0,0,0,0) self.pbaralign.add(self.pbar) self.pbaralign.show() for file in self.data.library.files: self.insert(file) self.filterRows("") def updates(self): self.pbar.show() self.updating = True gobject.timeout_add(500,self.updateLibview) def stopUpdates(self): self.updating = False self.pbar.hide() self.data.dump() def updateLibview(self): self.makeLabel() self.pbar.pulse() self.timeText() return self.updating