Skip to content

Commit

Permalink
@mbridak Changed read_cw_macros() to read_macros() and edit_cw_macros…
Browse files Browse the repository at this point in the history
…() to edit_macros()
  • Loading branch information
mbridak committed Nov 22, 2024
1 parent a66aec4 commit 18a368a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions not1mm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def __init__(self, splash):
self.actionNew_Database.triggered.connect(self.new_database)
self.actionOpen_Database.triggered.connect(self.open_database)

self.actionEdit_Macros.triggered.connect(self.edit_cw_macros)
self.actionEdit_Macros.triggered.connect(self.edit_macros)

self.actionAbout.triggered.connect(self.show_about_dialog)
self.actionHotKeys.triggered.connect(self.show_key_help)
Expand Down Expand Up @@ -659,7 +659,7 @@ def __init__(self, splash):
self.show_splash_msg("Loading contest.")
self.load_contest()
self.show_splash_msg("Reading macros.")
self.read_cw_macros()
self.read_macros()

self.show_splash_msg("Starting FlDigi watcher.")
self.fldigi_watcher = FlDigiWatcher()
Expand Down Expand Up @@ -2804,7 +2804,7 @@ def run_sp_buttons_clicked(self) -> None:
"""
self.pref["run_state"] = self.radioButton_run.isChecked()
self.write_preference()
self.read_cw_macros()
self.read_macros()
self.check_esm()

def write_preference(self) -> None:
Expand Down Expand Up @@ -3351,7 +3351,7 @@ def change_mode(self, mode: str, intended_freq=None) -> None:
self.set_band_indicator(band)
self.set_window_title()
self.clearinputs()
self.read_cw_macros()
self.read_macros()
return
if mode in (
"DIGI-U",
Expand All @@ -3372,7 +3372,7 @@ def change_mode(self, mode: str, intended_freq=None) -> None:
self.set_band_indicator(band)
self.set_window_title()
self.clearinputs()
self.read_cw_macros()
self.read_macros()
return
if mode == "SSB":
if intended_freq:
Expand All @@ -3393,7 +3393,7 @@ def change_mode(self, mode: str, intended_freq=None) -> None:
self.set_band_indicator(band)
self.set_window_title()
self.clearinputs()
self.read_cw_macros()
self.read_macros()

def check_callsign(self, callsign) -> None:
"""
Expand Down Expand Up @@ -3480,7 +3480,7 @@ def setmode(self, mode: str) -> None:
self.current_mode = "CW"
self.sent.setText("599")
self.receive.setText("599")
self.read_cw_macros()
self.read_macros()
if self.contest:
if self.contest.name == "ICWC Medium Speed Test":
self.contest.prefill(self)
Expand All @@ -3490,14 +3490,14 @@ def setmode(self, mode: str) -> None:
self.current_mode = "SSB"
self.sent.setText("59")
self.receive.setText("59")
self.read_cw_macros()
self.read_macros()
return
if mode in ("RTTY", "DIGI-U", "DIGI-L"):
if self.current_mode != "RTTY":
self.current_mode = "RTTY"
self.sent.setText("599")
self.receive.setText("599")
self.read_cw_macros()
self.read_macros()

def get_opon(self) -> None:
"""
Expand Down Expand Up @@ -3664,7 +3664,7 @@ def poll_radio(self, the_dict):
except TypeError as err:
logger.debug(f"{err=} {vfo=} {the_dict=}")

def edit_cw_macros(self) -> None:
def edit_macros(self) -> None:
"""
Calls the default text editor to edit the CW macro file.
Expand Down Expand Up @@ -3710,9 +3710,9 @@ def edit_cw_macros(self) -> None:
logger.critical(
f"Could not open file {fsutils.USER_DATA_PATH / macro_file} {err}"
)
self.read_cw_macros()
self.read_macros()

def read_cw_macros(self) -> None:
def read_macros(self) -> None:
"""
Reads in the CW macros, firsts it checks to see if the file exists. If it does not,
and this has been packaged with pyinstaller it will copy the default file from the
Expand Down

0 comments on commit 18a368a

Please sign in to comment.