From 2d50619b6c60fe68559369ab57b8b93442238513 Mon Sep 17 00:00:00 2001 From: Faraphel Date: Sat, 20 Aug 2022 23:23:30 +0200 Subject: [PATCH] the extension settings is now saved in the option.json file --- source/gui/install.py | 5 ++++- source/option.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/gui/install.py b/source/gui/install.py index 69d827b..31f17ba 100644 --- a/source/gui/install.py +++ b/source/gui/install.py @@ -325,9 +325,12 @@ class DestinationGame(ttk.LabelFrame): self.entry.grid(row=1, column=1, sticky="nsew") self.output_type = ttk.Combobox(self, width=5, values=[extension.name for extension in Extension]) - self.output_type.set(Extension.WBFS.name) + self.output_type.set(self.root.options["extension"]) self.output_type.grid(row=1, column=2, sticky="nsew") + def output_type_callback(_: tkinter.Event): self.root.options["extension"] = self.output_type.get() + self.output_type.bind("<>", output_type_callback) + self.button = ttk.Button(self, text="...", width=2, command=self.select) self.button.grid(row=1, column=3, sticky="nsew") diff --git a/source/option.py b/source/option.py index 6a30099..781f2d9 100644 --- a/source/option.py +++ b/source/option.py @@ -16,6 +16,7 @@ class Option: "threads": 8, "mystuff_pack_selected": None, "mystuff_packs": {}, + "extension": "WBFS", } def __init__(self, **options):