mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2024-11-21 12:20:56 +00:00
should a config be loaded during engine startup
bypass _base_values.run_update patch bump
This commit is contained in:
parent
1498daf36f
commit
c684ed9981
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "voicemeeter-compact"
|
||||
version = "1.9.2"
|
||||
version = "1.9.3"
|
||||
description = "A Compact Voicemeeter Remote App"
|
||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||
license = "MIT"
|
||||
|
@ -42,13 +42,13 @@ class App(tk.Tk):
|
||||
self.logger = logger.getChild(self.__class__.__name__)
|
||||
self._vmr = vmr
|
||||
self._vmr.event.add(["pdirty", "ldirty"])
|
||||
self.after(12000 if self._vmr.gui.launched_by_api else 1, self.start_updates)
|
||||
self.subject = Subject()
|
||||
self.start_updates()
|
||||
self._vmr.init_thread()
|
||||
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._configs = None
|
||||
self.protocol("WM_DELETE_WINDOW", self.on_close_window)
|
||||
self.menu = self["menu"] = Menus(self, vmr)
|
||||
@ -148,10 +148,15 @@ class App(tk.Tk):
|
||||
return self._configs
|
||||
|
||||
def start_updates(self):
|
||||
self.logger.debug("updates started")
|
||||
_base_values.run_update = True
|
||||
def init():
|
||||
self.logger.debug("updates started")
|
||||
_base_values.run_update = True
|
||||
|
||||
if self._vmr.gui.launched_by_api:
|
||||
self.on_pdirty()
|
||||
self.subject.notify("pdirty")
|
||||
self.after(12000, init)
|
||||
else:
|
||||
init()
|
||||
|
||||
def healthcheck_step(self):
|
||||
if not _base_values.vban_connected:
|
||||
|
@ -4,10 +4,11 @@ import webbrowser
|
||||
from functools import partial
|
||||
from tkinter import messagebox
|
||||
|
||||
import sv_ttk
|
||||
import vban_cmd
|
||||
from vban_cmd.error import VBANCMDConnectionError
|
||||
|
||||
import sv_ttk
|
||||
|
||||
from .data import _base_values, _configuration, get_configuration, kind_get
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -238,10 +239,14 @@ class Menus(tk.Menu):
|
||||
def load_custom_profile(self, profile):
|
||||
self.logger.info(f"loading user profile {profile}")
|
||||
self.target.apply(profile)
|
||||
if not _base_values.run_update:
|
||||
self.parent.subject.notify("pdirty")
|
||||
|
||||
def load_profile(self, profile):
|
||||
self.logger.info(f"loading user profile {profile}")
|
||||
self.target.apply_config(profile)
|
||||
if not _base_values.run_update:
|
||||
self.parent.subject.notify("pdirty")
|
||||
|
||||
def load_defaults(self):
|
||||
msg = (
|
||||
|
Loading…
Reference in New Issue
Block a user