From 6dfaf515bcd49b9b4d117a50374c4ebb8f47b546 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Wed, 20 Jul 2016 12:58:24 +0100 Subject: [PATCH] Disable update on docking option if no netLog --- edproxy.py | 2 +- prefs.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/edproxy.py b/edproxy.py index c5b41b6e..6ca14809 100644 --- a/edproxy.py +++ b/edproxy.py @@ -138,7 +138,7 @@ class _EDProxy: timestamp = timegm(datetime.strptime(msg['DateUtc'], '%Y-%m-%d %H:%M:%S').utctimetuple()) else: timestamp = mktime(strptime(msg['Date'], '%Y-%m-%d %H:%M:%S')) # from local time - self.last_event = (timestamp, msg['System']) + self.last_event = (timestamp, msg['System'], None) self.root.event_generate('<>', when="tail") except: if __debug__: print_exc() diff --git a/prefs.py b/prefs.py index 5b62219b..c3958a48 100644 --- a/prefs.py +++ b/prefs.py @@ -304,16 +304,17 @@ class PreferencesDialog(tk.Toplevel): self.out_log_auto_text['text'] = '' self.edsm_log_auto_text['text'] = '' if monitor.logdir or proxyaddr: - log = self.out_log_file.get() - self.out_log_auto_button['state'] = log and tk.NORMAL or tk.DISABLED - if log and self.out_log_auto.get() and proxyaddr: + self.out_auto_button['state'] = monitor.logdir and tk.NORMAL or tk.DISABLED # edproxy doesn't send docking status + self.out_log_auto_button['state'] = self.out_log_file.get() and tk.NORMAL or tk.DISABLED + if self.out_log_file.get() and self.out_log_auto.get() and proxyaddr: self.out_log_auto_text['text'] = _('Connected to {EDPROXY} at {ADDR}').format(EDPROXY = 'edproxy', ADDR = proxyaddr) # Output settings self.edsm_log_auto_button['state'] = edsm_state if self.out_log_edsm.get() and self.out_log_auto.get() and proxyaddr: self.edsm_log_auto_text['text'] = _('Connected to {EDPROXY} at {ADDR}').format(EDPROXY = 'edproxy', ADDR = proxyaddr) # Output settings else: - self.out_log_auto_button['state'] = tk.DISABLED + self.out_auto_button['state'] = tk.DISABLED + self.out_log_auto_button['state'] = tk.DISABLED self.edsm_log_auto_button['state'] = tk.DISABLED def outbrowse(self):