mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-10-22 17:22:09 +03:00
[2116] A Few More Hand-Overs
This commit is contained in:
4 files changed
+11
-10
No files matched your search
@@ -2052,7 +2052,7 @@ def show_killswitch_poppup(root=None):
|
||||
idx += 1
|
||||
idx += 1
|
||||
|
||||
ok_button = tk.Button(frame, text="Ok", command=tl.destroy)
|
||||
ok_button = ttk.Button(frame, text="Ok", command=tl.destroy)
|
||||
ok_button.grid(columnspan=2, sticky=tk.EW)
|
||||
|
||||
|
||||
|
||||
+5
-5
@@ -90,11 +90,11 @@ class This:
|
||||
self.newgame: bool = False # starting up - batch initial burst of events
|
||||
self.newgame_docked: bool = False # starting up while docked
|
||||
self.navbeaconscan: int = 0 # batch up burst of Scan events after NavBeaconScan
|
||||
self.system_link: tk.Widget | None = None
|
||||
self.system_link: ttk.Widget | None = None
|
||||
self.system_name: tk.Tk | None = None
|
||||
self.system_address: int | None = None # Frontier SystemAddress
|
||||
self.system_population: int | None = None
|
||||
self.station_link: tk.Widget | None = None
|
||||
self.station_link: ttk.Widget | None = None
|
||||
self.station_name: str | None = None
|
||||
self.station_marketid: int | None = None # Frontier MarketID
|
||||
self.on_foot = False
|
||||
@@ -109,7 +109,7 @@ class This:
|
||||
self.log: tk.IntVar | None = None
|
||||
self.log_button: ttk.Checkbutton | None = None
|
||||
|
||||
self.label: tk.Widget | None = None
|
||||
self.label: ttk.Widget | None = None
|
||||
|
||||
self.cmdr_label: nb.Label | None = None
|
||||
self.cmdr_text: nb.Label | None = None
|
||||
@@ -729,8 +729,8 @@ def send_to_edsm( # noqa: CCR001
|
||||
# Respect rate limits if they exist
|
||||
if remaining == 0:
|
||||
# Calculate sleep time until the rate limit reset time
|
||||
reset_time = datetime.utcfromtimestamp(reset)
|
||||
current_time = datetime.utcnow()
|
||||
reset_time = datetime.fromtimestamp(reset, tz=timezone.utc)
|
||||
current_time = datetime.now(timezone.utc)
|
||||
|
||||
sleep_time = (reset_time - current_time).total_seconds()
|
||||
|
||||
|
||||
+2
-2
@@ -113,11 +113,11 @@ class This:
|
||||
self.timer_run = True
|
||||
|
||||
# Main window clicks
|
||||
self.system_link: tk.Widget = None # type: ignore
|
||||
self.system_link: ttk.Widget = None # type: ignore
|
||||
self.system_name: str | None = None # type: ignore
|
||||
self.system_address: str | None = None # type: ignore
|
||||
self.system_population: int | None = None
|
||||
self.station_link: tk.Widget = None # type: ignore
|
||||
self.station_link: ttk.Widget = None # type: ignore
|
||||
self.station_name = None
|
||||
self.station_marketid = None
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ referenced in this file (or only in any other core plugin), and if so...
|
||||
from __future__ import annotations
|
||||
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
from typing import Any
|
||||
import requests
|
||||
from companion import CAPIData
|
||||
@@ -39,11 +40,11 @@ class This:
|
||||
def __init__(self):
|
||||
self.parent: tk.Tk
|
||||
self.shutting_down = False # Plugin is shutting down.
|
||||
self.system_link: tk.Widget = None # type: ignore
|
||||
self.system_link: ttk.Widget = None # type: ignore
|
||||
self.system_name: str | None = None
|
||||
self.system_address: str | None = None
|
||||
self.system_population: int | None = None
|
||||
self.station_link: tk.Widget = None # type: ignore
|
||||
self.station_link: ttk.Widget = None # type: ignore
|
||||
self.station_name = None
|
||||
self.station_marketid = None
|
||||
self.on_foot = False
|
||||
|
||||
Reference in new issue
Block a user