From b18589f7bfa36a27fbbb1fecbb3228088b6a3c88 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Sat, 24 Sep 2016 00:12:20 +0100 Subject: [PATCH] Disable API access if Journal says we're in beta --- EDMarketConnector.py | 2 +- prefs.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 38a61e06..9d3d5965 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -335,7 +335,7 @@ class AppWindow: auto_update = not event play_sound = (auto_update or int(event.type) == self.EVENT_VIRTUAL) and not config.getint('hotkey_mute') - if monitor.cmdr and not monitor.mode: + if (monitor.cmdr and not monitor.mode) or monitor.is_beta: return # In CQC - do nothing if not retrying: diff --git a/prefs.py b/prefs.py index 75c83789..f8c9a396 100644 --- a/prefs.py +++ b/prefs.py @@ -315,12 +315,12 @@ class PreferencesDialog(tk.Toplevel): logvalid = logdir and exists(logdir) local = self.out_bpc.get() or self.out_td.get() or self.out_csv.get() or self.out_ship_eds.get() or self.out_ship_coriolis.get() - self.out_auto_button['state'] = local and logvalid and tk.NORMAL or tk.DISABLED + self.out_auto_button['state'] = local and logvalid and not monitor.is_beta and tk.NORMAL or tk.DISABLED self.outdir_label['state'] = local and tk.NORMAL or tk.DISABLED self.outbutton['state'] = local and tk.NORMAL or tk.DISABLED self.outdir['state'] = local and 'readonly' or tk.DISABLED - self.eddn_auto_button['state'] = self.eddn_station.get() and logvalid and tk.NORMAL or tk.DISABLED + self.eddn_auto_button['state'] = self.eddn_station.get() and logvalid and not monitor.is_beta and tk.NORMAL or tk.DISABLED self.eddn_system_button['state']= logvalid and tk.NORMAL or tk.DISABLED self.eddn_delay_button['state'] = logvalid and eddn.replayfile and self.eddn_system.get() and tk.NORMAL or tk.DISABLED