mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2026-04-18 13:33:30 +00:00
on_close_window() callback added.
cleanly shuts down vban connection on windows close if vban connected.
This commit is contained in:
@@ -50,6 +50,7 @@ class App(tk.Tk):
|
||||
self.minsize(275, False)
|
||||
self.subject = Subject()
|
||||
self._configs = None
|
||||
self.protocol("WM_DELETE_WINDOW", self.on_close_window)
|
||||
self.menu = self["menu"] = Menus(self, vmr)
|
||||
self.styletable = ttk.Style()
|
||||
if _configuration.config:
|
||||
@@ -182,6 +183,11 @@ class App(tk.Tk):
|
||||
self.destroy()
|
||||
self.after(250, self.healthcheck_step)
|
||||
|
||||
def on_close_window(self):
|
||||
if _base_values.vban_connected:
|
||||
self._vban.logout()
|
||||
self.destroy()
|
||||
|
||||
|
||||
_apps = {kind.name: App.make(kind) for kind in _kinds_all}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user