mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Make EDSM log entry automatically on system entry
Don't make log entry at stations.
This commit is contained in:
parent
a30d85990b
commit
31364d29a2
@ -378,15 +378,11 @@ class AppWindow:
|
||||
if config.getint('output') & config.OUT_SHIP_CORIOLIS:
|
||||
coriolis.export(data)
|
||||
if config.getint('output') & config.OUT_SYS_EDSM:
|
||||
# Catch any EDSM errors here so that they don't prevent station update
|
||||
# Silently catch any EDSM errors here so that they don't prevent station update
|
||||
try:
|
||||
self.status['text'] = _('Sending data to EDSM...')
|
||||
self.w.update_idletasks()
|
||||
edsm.export(data, lambda:self.edsm.lookup(self.system['text'], EDDB.system(self.system['text']))) # Do EDSM lookup during EDSM export
|
||||
self.status['text'] = ''
|
||||
self.edsm.lookup(self.system['text'], EDDB.system(self.system['text']))
|
||||
except Exception as e:
|
||||
if __debug__: print_exc()
|
||||
self.status['text'] = unicode(e)
|
||||
else:
|
||||
self.edsm.link(self.system['text'])
|
||||
self.edsmpoll()
|
||||
@ -492,7 +488,7 @@ class AppWindow:
|
||||
|
||||
plug.notify_system_changed(timestamp, system, coordinates)
|
||||
|
||||
if config.getint('output') & (config.OUT_SYS_EDSM | config.OUT_SYS_AUTO) == (config.OUT_SYS_EDSM | OUT_SYS_AUTO):
|
||||
if config.getint('output') & config.OUT_SYS_EDSM:
|
||||
try:
|
||||
self.status['text'] = _('Sending data to EDSM...')
|
||||
self.w.update_idletasks()
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Vzhled";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Automaticky vytvořit záznam při vstoupení do systému";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically update on docking" = "Automaticky aktualizovat při zadokování";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Aussehen";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Automatisch Logbucheintrag bei Systemeintritt anlegen";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically update on docking" = "Automatisch beim Andocken aktualisieren";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Appearance";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Automatically make a log entry on entering a system";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically update on docking" = "Automatically update on docking";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Apariencia";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Crear automáticamente una entrada en el registro al entrar en un sistema";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically update on docking" = "Actualizar automáticamente al atracar";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Apparence";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Ajouter automatiquement une entrée au journal en entrant dans un système";
|
||||
|
||||
/* Cmdr stats. [stats.py] */
|
||||
"Balance" = "Solde";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Aspetto";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Inserisce automaticamente una log entry entrando in un sistema";
|
||||
|
||||
/* Cmdr stats. [stats.py] */
|
||||
"Balance" = "Saldo";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "表示";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "別の星系に移動したら自動的にフライトログを記録する";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically update on docking" = "ドッキングした際に自動でデータを更新する";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Izskats";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Automātiski veikt ierakstu ierodoties sistēmā";
|
||||
|
||||
/* Cmdr stats. [stats.py] */
|
||||
"Balance" = "Bilance";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Vormgeving";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Automatisch een log regel aanmaken bij het binnengaan van een stelsel";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically update on docking" = "Automatisch bijwerken na landing";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Wygląd";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Stwórz automatycznie wpis w logu po wejściu do systemu";
|
||||
|
||||
/* Cmdr stats. [stats.py] */
|
||||
"Balance" = "Saldo";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Внешний вид";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Автоматически заносить в журнал полета каждую посещённую систему";
|
||||
|
||||
/* Cmdr stats. [stats.py] */
|
||||
"Balance" = "Баланс";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Videz";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Shrani podatke v dnevnik leta, ko prispeš v sistem";
|
||||
|
||||
/* Cmdr stats. [stats.py] */
|
||||
"Balance" = "Ravnotežje";
|
||||
|
||||
|
@ -25,9 +25,6 @@
|
||||
/* Tab heading in settings. [prefs.py] */
|
||||
"Appearance" = "Зовнішній вигляд";
|
||||
|
||||
/* Output setting. [prefs.py] */
|
||||
"Automatically make a log entry on entering a system" = "Автоматично робити запис у журналі на вході в систему";
|
||||
|
||||
/* Cmdr stats. [stats.py] */
|
||||
"Balance" = "Баланс";
|
||||
|
||||
|
@ -79,7 +79,7 @@ class Config:
|
||||
# OUT_STAT = 64 # No longer available
|
||||
OUT_SHIP_CORIOLIS = 128
|
||||
OUT_SYS_EDSM = 256
|
||||
OUT_SYS_AUTO = 512
|
||||
# OUT_SYS_AUTO = 512 # Now always automatic
|
||||
OUT_MKT_MANUAL = 1024
|
||||
|
||||
if platform=='darwin':
|
||||
|
20
prefs.py
20
prefs.py
@ -153,10 +153,8 @@ class PreferencesDialog(tk.Toplevel):
|
||||
|
||||
HyperlinkLabel(edsmframe, text='Elite Dangerous Star Map', background=nb.Label().cget('background'), url='https://www.edsm.net/', underline=True).grid(columnspan=2, padx=PADX, sticky=tk.W) # Don't translate
|
||||
self.edsm_log = tk.IntVar(value = (output & config.OUT_SYS_EDSM) and 1)
|
||||
nb.Checkbutton(edsmframe, text=_('Send flight log to Elite Dangerous Star Map'), variable=self.edsm_log, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, sticky=tk.W)
|
||||
self.edsm_log_auto = tk.IntVar(value = output & config.OUT_SYS_AUTO and 1 or 0)
|
||||
self.edsm_log_auto_button = nb.Checkbutton(edsmframe, text=_('Automatically make a log entry on entering a system'), variable=self.edsm_log_auto, command=self.outvarchanged) # Output setting
|
||||
self.edsm_log_auto_button.grid(columnspan=2, padx=BUTTONX, sticky=tk.W)
|
||||
self.edsm_log_button = nb.Checkbutton(edsmframe, text=_('Send flight log to Elite Dangerous Star Map'), variable=self.edsm_log, command=self.outvarchanged)
|
||||
self.edsm_log_button.grid(columnspan=2, padx=BUTTONX, sticky=tk.W)
|
||||
|
||||
nb.Label(edsmframe).grid(sticky=tk.W) # big spacer
|
||||
self.edsm_label = HyperlinkLabel(edsmframe, text=_('Elite Dangerous Star Map credentials'), background=nb.Label().cget('background'), url='https://www.edsm.net/settings/api', underline=True) # Section heading in settings
|
||||
@ -275,11 +273,15 @@ class PreferencesDialog(tk.Toplevel):
|
||||
|
||||
|
||||
def outvarchanged(self):
|
||||
self.out_auto_button['state'] = monitor.logdir and tk.NORMAL or tk.DISABLED
|
||||
|
||||
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.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.edsm_log_button['state'] = monitor.logdir and tk.NORMAL or tk.DISABLED
|
||||
|
||||
edsm_state = self.edsm_log.get() and tk.NORMAL or tk.DISABLED
|
||||
self.edsm_label['state'] = edsm_state
|
||||
self.edsm_cmdr_label['state'] = edsm_state
|
||||
@ -287,13 +289,6 @@ class PreferencesDialog(tk.Toplevel):
|
||||
self.edsm_cmdr['state'] = edsm_state
|
||||
self.edsm_apikey['state'] = edsm_state
|
||||
|
||||
if monitor.logdir:
|
||||
self.out_auto_button['state'] = tk.NORMAL
|
||||
self.edsm_log_auto_button['state'] = edsm_state
|
||||
else:
|
||||
self.out_auto_button['state'] = tk.DISABLED
|
||||
self.edsm_log_auto_button['state'] = tk.DISABLED
|
||||
|
||||
def outbrowse(self):
|
||||
if platform != 'win32':
|
||||
import tkFileDialog
|
||||
@ -402,8 +397,7 @@ class PreferencesDialog(tk.Toplevel):
|
||||
(config.OUT_MKT_MANUAL if not self.out_auto.get() else 0) +
|
||||
(self.out_ship_eds.get() and config.OUT_SHIP_EDS) +
|
||||
(self.out_ship_coriolis.get() and config.OUT_SHIP_CORIOLIS) +
|
||||
(self.edsm_log.get() and config.OUT_SYS_EDSM) +
|
||||
(self.edsm_log_auto.get() and config.OUT_SYS_AUTO))
|
||||
(self.edsm_log.get() and config.OUT_SYS_EDSM))
|
||||
config.set('outdir', self.outdir.get().startswith('~') and join(config.home, self.outdir.get()[2:]) or self.outdir.get())
|
||||
|
||||
config.set('edsm_cmdrname', self.edsm_cmdr.get().strip())
|
||||
|
Loading…
x
Reference in New Issue
Block a user