diff --git a/plugins/eddn.py b/plugins/eddn.py index 96c839ad..13bdf108 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -46,7 +46,7 @@ import killswitch import myNotebook as nb # noqa: N813 import plug from companion import CAPIData, category_map -from config import applongname, appversion_nobuild, config, debug_senders, user_agent +from config import applongname, appname, appversion_nobuild, config, debug_senders, user_agent from EDMCLogging import get_main_logger from monitor import monitor from myNotebook import Frame @@ -382,7 +382,7 @@ class EDDNSender: logger.info(text) return - self.eddn.parent.children['status']['text'] = text + self.eddn.parent.nametowidget(f".{appname.lower()}.status")['text'] = text def send_message(self, msg: str) -> bool: """ @@ -2501,7 +2501,7 @@ def cmdr_data(data: CAPIData, is_beta: bool) -> Optional[str]: # noqa: CCR001 this.commodities = this.outfitting = this.shipyard = None this.marketId = data['lastStarport']['id'] - status = this.parent.children['status'] + status = this.parent.nametowidget(f".{appname.lower()}.status") old_status = status['text'] if not old_status: status['text'] = _('Sending data to EDDN...') # LANG: Status text shown while attempting to send data diff --git a/plugins/edsm.py b/plugins/edsm.py index 95d888d8..9eb9167a 100644 --- a/plugins/edsm.py +++ b/plugins/edsm.py @@ -628,7 +628,6 @@ entry: {entry!r}''' ): # LANG: The Inara API only accepts Live galaxy data, not Legacy galaxy data logger.info("EDSM only accepts Live galaxy data") - # this.parent.children['status']['text'] = this.legacy_galaxy_last_notified = datetime.now(timezone.utc) return _("EDSM only accepts Live galaxy data") diff --git a/plugins/inara.py b/plugins/inara.py index 941ec8f2..73ee482e 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -382,7 +382,6 @@ def journal_entry( # noqa: C901, CCR001 ): # LANG: The Inara API only accepts Live galaxy data, not Legacy galaxy data logger.info(_("Inara only accepts Live galaxy data")) - # this.parent.children['status']['text'] = this.legacy_galaxy_last_notified = datetime.now(timezone.utc) return _("Inara only accepts Live galaxy data")