updates to reflect changes to vm-api and vban-cmd.

patch bump
This commit is contained in:
onyx-and-iris
2022-08-02 10:06:35 +01:00
parent ca548187f1
commit bb65f1b819
5 changed files with 10 additions and 12 deletions

View File

@@ -34,13 +34,12 @@ class App(tk.Tk):
super().__init__()
self._vmr = vmr
self._vmr.event.add("ldirty")
icon_path = Path(__file__).parent.resolve() / "img" / "cat.ico"
if icon_path.is_file():
self.iconbitmap(str(icon_path))
self.minsize(275, False)
self.subject = Subject()
self.strip_levels = None
self.bus_levels = None
self["menu"] = Menus(self, vmr)
self.styletable = ttk.Style()
if _configuration.config:
@@ -139,6 +138,6 @@ def connect(kind_id: str, vmr) -> App:
try:
VMMIN_cls = _apps[kind_id]
return VMMIN_cls(vmr)
except KeyError:
raise VMCompactErrors(f"Invalid kind: {kind_id}")
return VMMIN_cls(vmr)

View File

@@ -288,6 +288,7 @@ class Menus(tk.Menu):
self.vban = vban_cmd.api(kind_id, **opts)
# login to vban interface
self.vban.login()
self.vban.event.add("ldirty")
# destroy the current App frames
self.parent._destroy_top_level_frames()
_base_values.vban_connected = True

View File

@@ -20,10 +20,8 @@ class Subject:
def remove(self, observer):
"""removes an observer from _observers"""
try:
if observer in self._observers:
self._observers.remove(observer)
except ValueError:
print(f"{observer} not in observers (ungridded)")
def get(self) -> list:
"""returns the current _observers"""