mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
[2262] SLEF to this var
This commit is contained in:
parent
d478a68bc6
commit
0cc35db96b
@ -107,6 +107,7 @@ class This:
|
|||||||
self.fleet: list[dict[str, Any]] | None = None
|
self.fleet: list[dict[str, Any]] | None = None
|
||||||
self.shipswap: bool = False # just swapped ship
|
self.shipswap: bool = False # just swapped ship
|
||||||
self.on_foot = False
|
self.on_foot = False
|
||||||
|
self.SLEF: str | None = None
|
||||||
|
|
||||||
self.timer_run = True
|
self.timer_run = True
|
||||||
|
|
||||||
@ -1504,7 +1505,10 @@ def make_slef(entry) -> None:
|
|||||||
'Modules': entry['Modules'],
|
'Modules': entry['Modules'],
|
||||||
})
|
})
|
||||||
initial_dict.update({'data': data_dict})
|
initial_dict.update({'data': data_dict})
|
||||||
json.dump(initial_dict, open('inara.json', 'w'), indent=4)
|
output = json.dumps(initial_dict, indent=4)
|
||||||
|
this.SLEF = str(output)
|
||||||
|
print('set output')
|
||||||
|
print(type(this.SLEF))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,6 +194,11 @@ class HyperlinkLabel(tk.Label or ttk.Label): # type: ignore
|
|||||||
menu.add_command(label=tr.tl('Copy'), command=self.copy) # As in Copy and Paste
|
menu.add_command(label=tr.tl('Copy'), command=self.copy) # As in Copy and Paste
|
||||||
|
|
||||||
if self.name == 'ship':
|
if self.name == 'ship':
|
||||||
|
# TODO: Get SLEF from Inara
|
||||||
|
# print(self.SLEF)
|
||||||
|
# menu.add_command(label=tr.tl('Copy INARA SLEF'), command=lambda: self.copy_slef(self), state=tk.DISABLED)
|
||||||
|
# menu.entryconfigure(1, state=self.SLEF and tk.NORMAL or tk.DISABLED)
|
||||||
|
|
||||||
menu.add_separator()
|
menu.add_separator()
|
||||||
for url in plug.provides('shipyard_url'):
|
for url in plug.provides('shipyard_url'):
|
||||||
menu.add_command(
|
menu.add_command(
|
||||||
@ -224,3 +229,8 @@ class HyperlinkLabel(tk.Label or ttk.Label): # type: ignore
|
|||||||
"""Copy the current text to the clipboard."""
|
"""Copy the current text to the clipboard."""
|
||||||
self.clipboard_clear()
|
self.clipboard_clear()
|
||||||
self.clipboard_append(self['text'])
|
self.clipboard_append(self['text'])
|
||||||
|
|
||||||
|
# def copy_slef(self, this) -> None:
|
||||||
|
# """Copy the current text to the clipboard."""
|
||||||
|
# self.clipboard_clear()
|
||||||
|
# self.clipboard_append(this.SLEF)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user