+ self.nav.setSize(len(self.logFiles))
+ self.nav.grid(row=0, column=1)
+ self.loadLogFile(self.nav)
+
+ def _cleanupJunkFiles(self) :
+ files = []
+ while self.logFiles :
+ f = self.logFiles.pop()
+ if not getsize(f) :
+ os.remove(f)
+ continue
+ else :
+ lfa = LogFileAnalyser(f)
+ if lfa.getLastEventTicks() is None :
+ os.remove(f)
+ continue
+
+ files.append(f)
+
+ self.logFiles = files
+
+
+ def loadLogFile(self, nav) :
+ index = nav.index - 1
+ filepath = self.logFiles[index]
+ filename = basename(filepath)
+ self.identFrame.setFileName(filename)
+ if self.resultsFrame :
+ self.resultsFrame.destroy()
+ self.resultsFrame = ResultsFrame(self.dataFrame, filepath)
+ self.resultsFrame.layResults()
+ self.resultsFrame.grid()