From 459881d618ee04cfcfc2875139570c3bd1f86de6 Mon Sep 17 00:00:00 2001 From: David Sangrey <rixxan@hullseals.space> Date: Mon, 13 May 2024 19:45:53 -0400 Subject: [PATCH] [1173] Fix Circular Import --- EDMarketConnector.py | 17 +---------------- ttkHyperlinkLabel.py | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index d9243063..8eebd631 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -431,25 +431,10 @@ from hotkey import hotkeymgr from l10n import translations as tr from monitor import monitor from theme import theme -from ttkHyperlinkLabel import HyperlinkLabel +from ttkHyperlinkLabel import HyperlinkLabel, SHIPYARD_HTML_TEMPLATE SERVER_RETRY = 5 # retry pause for Companion servers [s] -SHIPYARD_HTML_TEMPLATE = """ -<!DOCTYPE HTML> -<html> - <head> - <meta http-equiv="refresh" content="0; url={link}"> - <title>Redirecting you to your {ship_name} at {provider_name}...</title> - </head> - <body> - <a href="{link}"> - You should be redirected to your {ship_name} at {provider_name} shortly... - </a> - </body> -</html> -""" - class AppWindow: """Define the main application window.""" diff --git a/ttkHyperlinkLabel.py b/ttkHyperlinkLabel.py index f7780566..3ec0a26d 100644 --- a/ttkHyperlinkLabel.py +++ b/ttkHyperlinkLabel.py @@ -32,7 +32,21 @@ from os import path from config import config, logger from l10n import translations as tr from monitor import monitor -from EDMarketConnector import SHIPYARD_HTML_TEMPLATE + +SHIPYARD_HTML_TEMPLATE = """ +<!DOCTYPE HTML> +<html> + <head> + <meta http-equiv="refresh" content="0; url={link}"> + <title>Redirecting you to your {ship_name} at {provider_name}...</title> + </head> + <body> + <a href="{link}"> + You should be redirected to your {ship_name} at {provider_name} shortly... + </a> + </body> +</html> +""" class HyperlinkLabel(tk.Label or ttk.Label): # type: ignore