mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
Switch to using a bool config value for fleetcarrier CAPI instead of int
This commit is contained in:
parent
4a2401983d
commit
933520c5af
@ -1582,7 +1582,7 @@ class AppWindow(object):
|
|||||||
if not should_return:
|
if not should_return:
|
||||||
self.w.after(int(SERVER_RETRY * 1000), self.capi_request_data)
|
self.w.after(int(SERVER_RETRY * 1000), self.capi_request_data)
|
||||||
|
|
||||||
if entry['event'] in ('CarrierBuy', 'CarrierStats') and config.get_int('capi_fleetcarrier') == 1:
|
if entry['event'] in ('CarrierBuy', 'CarrierStats') and config.get_bool('capi_fleetcarrier'):
|
||||||
should_return, new_data = killswitch.check_killswitch('capi.request.fleetcarrier', {})
|
should_return, new_data = killswitch.check_killswitch('capi.request.fleetcarrier', {})
|
||||||
if not should_return:
|
if not should_return:
|
||||||
self.w.after(int(SERVER_RETRY * 1000), self.capi_request_fleetcarrier_data)
|
self.w.after(int(SERVER_RETRY * 1000), self.capi_request_fleetcarrier_data)
|
||||||
|
4
prefs.py
4
prefs.py
@ -471,7 +471,7 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
).grid(column=2, pady=self.PADY, sticky=tk.EW, row=row.get())
|
).grid(column=2, pady=self.PADY, sticky=tk.EW, row=row.get())
|
||||||
|
|
||||||
# CAPI settings
|
# CAPI settings
|
||||||
self.capi_fleetcarrier = tk.IntVar(value=config.get_int('capi_fleetcarrier'))
|
self.capi_fleetcarrier = tk.BooleanVar(value=config.get_bool('capi_fleetcarrier'))
|
||||||
|
|
||||||
ttk.Separator(config_frame, orient=tk.HORIZONTAL).grid(
|
ttk.Separator(config_frame, orient=tk.HORIZONTAL).grid(
|
||||||
columnspan=4, padx=self.PADX, pady=self.PADY*4, sticky=tk.EW, row=row.get()
|
columnspan=4, padx=self.PADX, pady=self.PADY*4, sticky=tk.EW, row=row.get()
|
||||||
@ -1263,7 +1263,7 @@ class PreferencesDialog(tk.Toplevel):
|
|||||||
else:
|
else:
|
||||||
config.set('journaldir', logdir)
|
config.set('journaldir', logdir)
|
||||||
|
|
||||||
config.set('capi_fleetcarrier', int(self.capi_fleetcarrier.get()))
|
config.set('capi_fleetcarrier', self.capi_fleetcarrier.get())
|
||||||
|
|
||||||
if sys.platform in ('darwin', 'win32'):
|
if sys.platform in ('darwin', 'win32'):
|
||||||
config.set('hotkey_code', self.hotkey_code)
|
config.set('hotkey_code', self.hotkey_code)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user