From 4ab322efd45a1665b3ac8693e3673f5ecc18ed89 Mon Sep 17 00:00:00 2001 From: Peter Story <peter.garth.story@gmail.com> Date: Thu, 18 Apr 2024 15:07:11 -0400 Subject: [PATCH] Rename send_files() to send_or_cancel() For consistency with receive_or_cancel(). For #3 --- src/pydiode/gui/main.py | 4 ++-- src/pydiode/gui/send.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pydiode/gui/main.py b/src/pydiode/gui/main.py index e1ce1b9..b67ef6f 100644 --- a/src/pydiode/gui/main.py +++ b/src/pydiode/gui/main.py @@ -11,7 +11,7 @@ from pydiode.gui.send import ( add_source_files, remove_source_files, - send_files, + send_or_cancel, update_tx_btn, SEND_PROCESSES, ) @@ -96,7 +96,7 @@ def gui_main(): tx_btn = ttk.Button( tx_inner, text="Start Sending", - command=lambda: send_files( + command=lambda: send_or_cancel( root, sources_list, send_ip.get(), diff --git a/src/pydiode/gui/send.py b/src/pydiode/gui/send.py index 1ffe47c..47fac81 100644 --- a/src/pydiode/gui/send.py +++ b/src/pydiode/gui/send.py @@ -86,7 +86,7 @@ def get_increment_size(sources_list, progress_bar): return progress_bar["maximum"] / n_increments -def send_files( +def send_or_cancel( root, sources_list, send_ip,