diff --git a/plugins/eddb.py b/plugins/eddb.py index 1613ba5b..683b1b9a 100644 --- a/plugins/eddb.py +++ b/plugins/eddb.py @@ -81,13 +81,9 @@ def plugin_app(parent: 'Tk'): def prefs_changed(cmdr, is_beta): - # Override standard URL functions - if config.get('system_provider') == 'eddb': - this.system_link['url'] = system_url(this.system) - - if config.get('station_provider') == 'eddb': - this.station_link['url'] = station_url(this.system, this.station) - + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. + pass def journal_entry(cmdr, is_beta, system, station, entry, state): # Always update, even if we're not the *current* system or station provider. @@ -110,7 +106,8 @@ def journal_entry(cmdr, is_beta, system, station, entry, state): # Only actually change URLs if we are current provider. if config.get('system_provider') == 'eddb': this.system_link['text'] = this.system - this.system_link['url'] = system_url(this.system) # Override standard URL function + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.system_link.update_idletasks() # But only actually change the URL if we are current station provider. @@ -124,7 +121,8 @@ def journal_entry(cmdr, is_beta, system, station, entry, state): text = '' this.station_link['text'] = text - this.station_link['url'] = station_url(this.system, this.station) # Override standard URL function + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.station_link.update_idletasks() @@ -143,7 +141,8 @@ def cmdr_data(data, is_beta): # Override standard URL functions if config.get('system_provider') == 'eddb': this.system_link['text'] = this.system - this.system_link['url'] = system_url(this.system) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.system_link.update_idletasks() if config.get('station_provider') == 'eddb': @@ -156,5 +155,6 @@ def cmdr_data(data, is_beta): else: this.station_link['text'] = '' - this.station_link['url'] = station_url(this.system, this.station) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.station_link.update_idletasks() diff --git a/plugins/edsm.py b/plugins/edsm.py index 9c9d0070..27cb6c41 100644 --- a/plugins/edsm.py +++ b/plugins/edsm.py @@ -297,7 +297,8 @@ def cmdr_data(data, is_beta): if config.get('system_provider') == 'EDSM': this.system_link['text'] = this.system - this.system_link['url'] = system_url(this.system) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.system_link.update_idletasks() if config.get('station_provider') == 'EDSM': if data['commander']['docked']: @@ -307,7 +308,8 @@ def cmdr_data(data, is_beta): else: this.station_link['text'] = '' - this.station_link['url'] = station_url(this.system, this.station) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.station_link.update_idletasks() diff --git a/plugins/inara.py b/plugins/inara.py index 608b8d61..ebba39c0 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -244,13 +244,6 @@ def prefs_changed(cmdr: str, is_beta: bool): changed = config.getint('inara_out') != this.log.get() config.set('inara_out', this.log.get()) - # Override standard URL functions - if config.get('system_provider') == 'Inara': - this.system_link['url'] = system_url(this.system) - - if config.get('station_provider') == 'Inara': - this.station_link['url'] = station_url(this.system, this.station) - if cmdr and not is_beta: this.cmdr = cmdr this.FID = None @@ -998,7 +991,8 @@ def journal_entry(cmdr: str, is_beta: bool, system: str, station: str, entry: Di # Only actually change URLs if we are current provider. if config.get('system_provider') == 'Inara': this.system_link['text'] = this.system - this.system_link['url'] = system_url(this.system) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.system_link.update_idletasks() if config.get('station_provider') == 'Inara': @@ -1010,7 +1004,8 @@ def journal_entry(cmdr: str, is_beta: bool, system: str, station: str, entry: Di to_set = '' this.station_link['text'] = to_set - this.station_link['url'] = station_url(this.system, this.station) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.station_link.update_idletasks() @@ -1030,7 +1025,8 @@ def cmdr_data(data, is_beta): # Override standard URL functions if config.get('system_provider') == 'Inara': this.system_link['text'] = this.system - this.system_link['url'] = system_url(this.system) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.system_link.update_idletasks() if config.get('station_provider') == 'Inara': @@ -1043,7 +1039,8 @@ def cmdr_data(data, is_beta): else: this.station_link['text'] = '' - this.station_link['url'] = station_url(this.system, this.station) + # Do *NOT* set 'url' here, as it's set to a function that will call + # through correctly. We don't want a static string. this.station_link.update_idletasks() if config.getint('inara_out') and not is_beta and not this.multicrew and credentials(this.cmdr):