From 288a055712b027e152b86585ffeb8f8c056980d7 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Mon, 24 Feb 2020 16:22:41 +0100 Subject: [PATCH] Change Nothing task to Pause. --- main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 96900a9..a01208d 100644 --- a/main.py +++ b/main.py @@ -17,7 +17,7 @@ class App: self.tasks = Tasks() self.log = Log() - self.active_task = self.log.last_log() or "Nothing" + self.active_task = self.log.last_log() or "Pause" icon = QtGui.QIcon.fromTheme("appointment-new") @@ -43,18 +43,20 @@ class App: @QtCore.Slot() def report_done(self): - self.active_task = self.log.last_log() or "Nothing" + self.active_task = self.log.last_log() or "Pause" self.update_tray_menu() def change_task(self, task): self.active_task = task + if task == "Pause": + return self.log.log(task) self.update_tray_menu() def update_tray_menu(self): self.menu.clear() tasks = list(self.tasks.tasks) - tasks.append("Nothing") + tasks.append("Pause") for t in tasks: a = self.menu.addAction(t)