mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-01 16:11:18 +03:00
EDDN: Add --eddn-tracking-ui CL arg
This will only work on startup for now, with it present/active the EDDN plugin will add a UI frame to show what it's tracking. Intended for developer use only.
This commit is contained in:
parent
15ea858c6b
commit
72f584481a
@ -155,6 +155,12 @@ if __name__ == '__main__': # noqa: C901
|
|||||||
'--eddn-url',
|
'--eddn-url',
|
||||||
help='Specify an alternate EDDN upload URL',
|
help='Specify an alternate EDDN upload URL',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
'--eddn-tracking-ui',
|
||||||
|
help='Have EDDN plugin show what it is tracking',
|
||||||
|
action='store_true',
|
||||||
|
)
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
14
config.py
14
config.py
@ -208,6 +208,7 @@ class AbstractConfig(abc.ABC):
|
|||||||
__auth_force_localserver = False # Should we use localhost for auth callback ?
|
__auth_force_localserver = False # Should we use localhost for auth callback ?
|
||||||
__auth_force_edmc_protocol = False # Should we force edmc:// protocol ?
|
__auth_force_edmc_protocol = False # Should we force edmc:// protocol ?
|
||||||
__eddn_url = None # Non-default EDDN URL
|
__eddn_url = None # Non-default EDDN URL
|
||||||
|
__eddn_tracking_ui = False # Show EDDN tracking UI ?
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.home_path = pathlib.Path.home()
|
self.home_path = pathlib.Path.home()
|
||||||
@ -264,6 +265,19 @@ class AbstractConfig(abc.ABC):
|
|||||||
"""
|
"""
|
||||||
return self.__eddn_url
|
return self.__eddn_url
|
||||||
|
|
||||||
|
def set_eddn_tracking_ui(self):
|
||||||
|
"""Activate EDDN tracking UI."""
|
||||||
|
self.__eddn_tracking_ui = True
|
||||||
|
|
||||||
|
@property
|
||||||
|
def eddn_tracking_ui(self) -> bool:
|
||||||
|
"""
|
||||||
|
Determine if the EDDN tracking UI be shown.
|
||||||
|
|
||||||
|
:return: bool - Should tracking UI be active?
|
||||||
|
"""
|
||||||
|
return self.__eddn_tracking_ui
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def app_dir(self) -> str:
|
def app_dir(self) -> str:
|
||||||
"""Return a string version of app_dir."""
|
"""Return a string version of app_dir."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user