mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
applications manager works with expect icons
This commit is contained in:
parent
bb280f7ba5
commit
b24be8f4e4
1 changed files with 8 additions and 0 deletions
|
|
@ -123,6 +123,7 @@ class Application:
|
|||
self.app_name = app_name
|
||||
self.label = app_data["label"]
|
||||
self.variant_label = app_data["variant_label"] or None
|
||||
self.icon = app_data["icon"] or None
|
||||
|
||||
self.enabled = app_data["enabled"]
|
||||
|
||||
|
|
@ -446,6 +447,9 @@ class ApplicationManager:
|
|||
def __init__(self):
|
||||
self.log = logging.getLogger(self.__class__.__name__)
|
||||
|
||||
self.registered_hook_paths = []
|
||||
self.registered_hooks = []
|
||||
|
||||
self.applications = {}
|
||||
|
||||
self.refresh()
|
||||
|
|
@ -457,6 +461,7 @@ class ApplicationManager:
|
|||
enabled = variant_definitions["enabled"]
|
||||
label = variant_definitions.get("label") or host_name
|
||||
variants = variant_definitions.get("variants") or {}
|
||||
icon = variant_definitions.get("icon")
|
||||
for app_name, app_data in variants.items():
|
||||
# If host is disabled then disable all variants
|
||||
if not enabled:
|
||||
|
|
@ -466,6 +471,9 @@ class ApplicationManager:
|
|||
if not app_data.get("label"):
|
||||
app_data["label"] = label
|
||||
|
||||
if not app_data.get("icon"):
|
||||
app_data["icon"] = icon
|
||||
|
||||
if app_name in self.applications:
|
||||
raise AssertionError((
|
||||
"BUG: Duplicated application name in settings \"{}\""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue