only store the last 5 events

This commit is contained in:
Sebastian Wehling-Benatelli 2015-02-13 11:16:20 +01:00
parent 1c40cb3852
commit 7e3bcefd19

View File

@ -239,6 +239,10 @@ class MainWindow(QMainWindow):
fname = fnConstructor(eventID)
if eventID != current and QFile.exists(fname):
recentEvents.append(eventID)
recentEvents.reverse()
self.recentEvents = recentEvents[0:5]
settings = QSettings()
settings.setValue()
if recentEvents:
for i, eventID in enumerate(recentEvents):
fname = fnConstructor(eventID)