Change Nothing task to Pause.
This commit is contained in:
parent
19a7dbf6db
commit
288a055712
8
main.py
8
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)
|
||||
|
Loading…
Reference in New Issue
Block a user