- def list_actions(self, action_number=0):
- self.parent.parent.ids['ActionList'].update_list(self, action_number)
-
+ def list_actions(self, last_action_finished=False):
+ not_running = (not self.is_loaded_running())
+ current_action_seen = False
+ action_descriptions = []
+ for action in self.actions:
+ if not_running:
+ state = "inactive"
+ elif last_action_finished:
+ state = "done"
+ elif current_action_seen:
+ state = "pending"
+ elif action == self.current_action:
+ current_action_seen = True
+ state = "current"
+ else:
+ state = "done"
+ action_descriptions.append([action.description(), state])
+ self.parent.parent.ids['ActionList'].update_list(
+ self,
+ action_descriptions)