3 Commits

Author SHA1 Message Date
e4068277f7 ensure we don't attempt to delete a menu key twice
patch bump
2023-07-07 03:37:06 +01:00
674999a461 remove callbacks instead
patch bump
2023-06-30 04:27:10 +01:00
e5975f0772 fixes bug where old configs may not have new keys
patch bump
2023-06-29 19:13:06 +01:00
4 changed files with 23 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "voicemeeter-compact" name = "voicemeeter-compact"
version = "1.8.0" version = "1.8.3"
description = "A Compact Voicemeeter Remote App" description = "A Compact Voicemeeter Remote App"
authors = ["onyx-and-iris <code@onyxandiris.online>"] authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT" license = "MIT"

View File

@@ -123,7 +123,7 @@ class App(tk.Tk):
Destroy all top level frames. Destroy all top level frames.
""" """
self.target.subject.remove(self) self.target.subject.remove([self.on_pdirty, self.on_ldirty])
self.subject.clear() self.subject.clear()
[ [
frame.destroy() frame.destroy()

View File

@@ -59,8 +59,13 @@ _defaults = {
"navigation": {"show": True}, "navigation": {"show": True},
} }
if "app" in configuration: if "app" in configuration:
configuration["app"] = _defaults | configuration["app"] for key in _defaults:
if key in configuration["app"]:
configuration["app"][key] = _defaults[key] | configuration["app"][key]
else:
configuration["app"][key] = _defaults[key]
else: else:
configuration["app"] = _defaults configuration["app"] = _defaults

View File

@@ -315,16 +315,21 @@ class Menus(tk.Menu):
def menu_teardown(self, i): def menu_teardown(self, i):
# remove config load menus # remove config load menus
[ removed = []
for key in self.target.configs.keys():
if key not in self.config_defaults:
try:
self.menu_configs_load.delete(key) self.menu_configs_load.delete(key)
for key in self.target.configs.keys() removed.append(key)
if key not in self.config_defaults except tk._tkinter.tclError as e:
] self.logger.warning(f"{type(e).__name__}: {e}")
[
for key in self.parent.userconfigs.keys():
if key not in self.config_defaults and key not in removed:
try:
self.menu_configs_load.delete(key) self.menu_configs_load.delete(key)
for key in self.parent.userconfigs.keys() except tk._tkinter.tclError as e:
if key not in self.config_defaults self.logger.warning(f"{type(e).__name__}: {e}")
]
[ [
self.menu_vban.entryconfig(j, state="disabled") self.menu_vban.entryconfig(j, state="disabled")