This commit is contained in:
2025-05-09 21:28:39 +02:00
parent 9ad45ed63f
commit 6407cf4229
5 changed files with 39 additions and 23 deletions

View File

@@ -32,11 +32,11 @@ class Window(tk.Toplevel):
class EditRecord(Window):
def __init__(self, parent, root: tk.Tk, record_id: int):
def __init__(self, parent, root: tk.Tk, record_id: int, config: Config):
super().__init__(parent, root)
self.bind("<Return>", self._update)
self.model = JSONConnector()
self.model = JSONConnector(config)
record = self.model.get_by_id(record_id)
@@ -86,10 +86,10 @@ class EditRecord(Window):
class SettingsWindow(Window):
def __init__(self, parent, root: tk.Tk):
def __init__(self, parent, root: tk.Tk, config: Config):
super().__init__(parent, root)
self.geometry(f"500x330+{self.root.winfo_x() + 20}+{self.root.winfo_y() + 20}")
self.config = Config()
self.config = config
self.json_file = tk.StringVar()
self.csv_file = tk.StringVar()