Skip to content

Commit

Permalink
use configure display function in view.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zztin committed Dec 30, 2020
1 parent eb4b761 commit 8a19e1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ctimer/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def countdown(self):
# TODO: Bug fix --This is reached before reason is filled. check line 134
db.db_add_clock_details(self.tm.db_file, self.tm.clock_details)
self.tm.remaining_time = self.tm.set_time
self.tv.configure_display("Break is over!", self.tm.is_break)
self.tv.configure_display("Click start!", self.tm.is_break)
self.tv.show_start_button()
self.tm.clock_ticking = False

Expand Down
5 changes: 2 additions & 3 deletions ctimer/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def not_bring_to_front(self):
self.master.attributes("-topmost", 0)

def create_widgets(self):
self._label_display.config(text="Click start!")
self.configure_display("Click start!", self.tm.is_break)
# self._label_display.config(text=self.set_time_print)
self._label_date.config(text=self.tm.clock_details.date)
self._label_total_clock_aim.config(text=f"Aim: {self.data.aim_clock_count}")
Expand Down Expand Up @@ -203,14 +203,13 @@ def start_pause(self):
def terminate(self):
self._button_start_pause["text"] = "Start"
self._button_start_pause["fg"] = "Green"
self._label_display["fg"] = "Black"
self.tm.is_break = False
self.tm.clock_ticking = False
db.safe_closing_data_entry(self.tm.db_file, self.tm.clock_details)
self.tm.remaining_time = self.tm.set_time
# # this clock is shorter than 25 mins
# self.clock_details.end_clock = time.time()
self._label_display.config(text="Click start!")
self.configure_display("Click start!", self.tm.is_break)
self.voice_message("stop")

def flash_window(self, flashing_seconds=5):
Expand Down

0 comments on commit 8a19e1a

Please sign in to comment.