Skip to content

Commit

Permalink
remove calls to pause button
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmiglio committed Apr 7, 2024
1 parent d04cb1e commit 4232843
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/pyclashbot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,6 @@ def start_button_event(logger: Logger, window: Window, values) -> WorkerThread |

# enable the stop button after the thread is started
window["Stop"].update(disabled=False)
window["-Pause-Resume-Button-"].update(text="Pause")
window["-Pause-Resume-Button-"].update(disabled=False)

return thread

Expand All @@ -336,8 +334,6 @@ def stop_button_event(logger: Logger, window, thread: StoppableThread) -> None:
"""
logger.change_status(status="Stopping")
window["Stop"].update(disabled=True)
window["-Pause-Resume-Button-"].update(text="Pause")
window["-Pause-Resume-Button-"].update(disabled=True)
thread.shutdown(kill=False) # send the shutdown flag to the thread


Expand Down Expand Up @@ -381,7 +377,6 @@ def handle_thread_finished(
window[key].update(disabled=False)
if thread.logger.errored:
window["Stop"].update(disabled=True)
window["-Pause-Resume-Button-"].update(disabled=True)
else:
# reset the logger
logger = Logger(timed=False)
Expand Down Expand Up @@ -424,7 +419,6 @@ def main_gui(start_on_run=False, settings: None | dict[str, str] = None) -> None
elif event == "Stop" and thread is not None:
stop_button_event(logger, window, thread)

# on pause/resume event, pause/resume the thread
elif event == "-Collapse-Button-":
window["-Collapse-Button-"].update(
text="Expand" if window["-tab-group-"].visible else "Collapse"
Expand Down

0 comments on commit 4232843

Please sign in to comment.