From 43ee693971dd605fdc23b05b5e82a15aaf403d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20W=C3=A4ndahl?= <62021989+awandahl@users.noreply.github.com> Date: Sun, 15 Dec 2024 21:34:40 +0100 Subject: [PATCH] Update general_logging.py Provision for logging without supplying name/comments --- not1mm/plugins/general_logging.py | 37 +++++++++++++++++++------------ 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/not1mm/plugins/general_logging.py b/not1mm/plugins/general_logging.py index bd88124..40c95ee 100644 --- a/not1mm/plugins/general_logging.py +++ b/not1mm/plugins/general_logging.py @@ -183,14 +183,18 @@ def process_esm(self, new_focused_widget=None, with_enter=False): buttons_to_send.append(self.esm_dict["HISCALL"]) buttons_to_send.append(self.esm_dict["EXCH"]) +# elif self.current_widget in ["other_1", "other_2"]: +# if self.other_2.text() == "" and self.other_1.text() == "": +# self.make_button_green(self.esm_dict["AGN"]) +# buttons_to_send.append(self.esm_dict["AGN"]) +# else: +# self.make_button_green(self.esm_dict["QRZ"]) +# buttons_to_send.append(self.esm_dict["QRZ"]) +# buttons_to_send.append("LOGIT") + elif self.current_widget in ["other_1", "other_2"]: - if self.other_2.text() == "" and self.other_1.text() == "": - self.make_button_green(self.esm_dict["AGN"]) - buttons_to_send.append(self.esm_dict["AGN"]) - else: - self.make_button_green(self.esm_dict["QRZ"]) - buttons_to_send.append(self.esm_dict["QRZ"]) - buttons_to_send.append("LOGIT") + buttons_to_send.append("LOGIT") + if with_enter is True and bool(len(buttons_to_send)): for button in buttons_to_send: @@ -205,14 +209,19 @@ def process_esm(self, new_focused_widget=None, with_enter=False): self.make_button_green(self.esm_dict["MYCALL"]) buttons_to_send.append(self.esm_dict["MYCALL"]) +# elif self.current_widget in ["other_1", "other_2"]: +# if self.other_2.text() == "" and self.other_1.text() == "": +# self.make_button_green(self.esm_dict["AGN"]) +# buttons_to_send.append(self.esm_dict["AGN"]) +# else: +# self.make_button_green(self.esm_dict["EXCH"]) +# buttons_to_send.append(self.esm_dict["EXCH"]) +# buttons_to_send.append("LOGIT") + elif self.current_widget in ["other_1", "other_2"]: - if self.other_2.text() == "" and self.other_1.text() == "": - self.make_button_green(self.esm_dict["AGN"]) - buttons_to_send.append(self.esm_dict["AGN"]) - else: - self.make_button_green(self.esm_dict["EXCH"]) - buttons_to_send.append(self.esm_dict["EXCH"]) - buttons_to_send.append("LOGIT") + buttons_to_send.append("LOGIT") + + if with_enter is True and bool(len(buttons_to_send)): for button in buttons_to_send: if button: