@@ -105,7 +105,7 @@ def start_timer(duration):
105105 if not timer_running [0 ]:
106106 timer_running [0 ] = True
107107 paused [0 ] = False
108- pause_button .config (text = "Pause Timer" , state = tb . NORMAL )
108+ pause_button .config (text = "Pause Timer" , state = "normal" )
109109 disable_buttons ()
110110 t = threading .Thread (
111111 target = countdown ,
@@ -118,7 +118,7 @@ def start_timer(duration):
118118def cancel_timer ():
119119 timer_running [0 ] = False
120120 paused [0 ] = False
121- pause_button .config (text = "Pause Timer" , state = tb . DISABLED )
121+ pause_button .config (text = "Pause Timer" , state = "disabled" )
122122 enable_buttons ()
123123 update_time_label (0 , 0 )
124124 entry .delete (0 , tb .END ) # Clear the entry field when cancelling
@@ -145,21 +145,21 @@ def custom():
145145
146146
147147def disable_buttons ():
148- button1 .config (state = tb . DISABLED )
149- button2 .config (state = tb . DISABLED )
150- button3 .config (state = tb . DISABLED )
148+ button1 .config (state = "disabled" )
149+ button2 .config (state = "disabled" )
150+ button3 .config (state = "disabled" )
151151 # Remove start_button if not present
152- cancel_button .config (state = tb . NORMAL )
153- pause_button .config (state = tb . NORMAL )
152+ cancel_button .config (state = "normal" )
153+ pause_button .config (state = "normal" )
154154
155155
156156def enable_buttons ():
157- button1 .config (state = tb . NORMAL )
158- button2 .config (state = tb . NORMAL )
159- button3 .config (state = tb . NORMAL )
157+ button1 .config (state = "normal" )
158+ button2 .config (state = "normal" )
159+ button3 .config (state = "normal" )
160160 # Remove start_button if not present
161- cancel_button .config (state = tb . DISABLED )
162- pause_button .config (state = tb . DISABLED )
161+ cancel_button .config (state = "disabled" )
162+ pause_button .config (state = "disabled" )
163163
164164
165165theme = "darkly" if darkdetect .isDark () else "flatly"
@@ -218,12 +218,12 @@ def enable_buttons():
218218action_frame .pack (pady = 10 )
219219
220220pause_button = tb .Button (
221- action_frame , text = "Pause Timer" , command = pause_timer , state = tb . DISABLED
221+ action_frame , text = "Pause Timer" , command = pause_timer , state = "disabled"
222222)
223223pause_button .grid (row = 0 , column = 0 , padx = 10 )
224224
225225cancel_button = tb .Button (
226- action_frame , text = "Cancel Timer" , command = cancel_timer , state = tb . DISABLED
226+ action_frame , text = "Cancel Timer" , command = cancel_timer , state = "disabled"
227227)
228228cancel_button .grid (row = 0 , column = 1 , padx = 10 )
229229
0 commit comments