1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

core plugins: A little more 'children' fixup

* eddn: Needs to find status text, although really there should be a helper
  function for this.
* Removed commented out references to same in edsm and inara.
This commit is contained in:
Athanasius 2022-12-31 16:49:29 +00:00
parent f2de70bad6
commit 0fd835e9ac
No known key found for this signature in database
GPG Key ID: 772697E181BB2767
3 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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")

View File

@ -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")