Preliminary controller layout work for plugin integration; controller base message refactor naming
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
"""
|
||||
Gtk Plugins DTO Module
|
||||
"""
|
||||
@@ -1,27 +0,0 @@
|
||||
# Python imports
|
||||
from dataclasses import dataclass, field
|
||||
from dataclasses import asdict
|
||||
|
||||
# Gtk imports
|
||||
|
||||
# Application imports
|
||||
from .requests import Requests
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class Manifest:
|
||||
name: str = ""
|
||||
author: str = ""
|
||||
credit: str = ""
|
||||
version: str = "0.0.1"
|
||||
support: str = "support@mail.com"
|
||||
pre_launch: bool = False
|
||||
requests: Requests = field(default_factory = lambda: Requests())
|
||||
|
||||
def __post_init__(self):
|
||||
if isinstance(self.requests, dict):
|
||||
self.requests = Requests(**self.requests)
|
||||
|
||||
def as_dict(self):
|
||||
return asdict(self)
|
||||
@@ -1,19 +0,0 @@
|
||||
# Python imports
|
||||
from dataclasses import dataclass, field
|
||||
from dataclasses import asdict
|
||||
|
||||
# Gtk imports
|
||||
|
||||
# Application imports
|
||||
from .manifest import Manifest
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class ManifestMeta:
|
||||
folder: str = ""
|
||||
path: str = ""
|
||||
manifest: Manifest = field(default_factory = lambda: Manifest())
|
||||
|
||||
def as_dict(self):
|
||||
return asdict(self)
|
||||
@@ -1,15 +0,0 @@
|
||||
# Python imports
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
|
||||
|
||||
@dataclass
|
||||
class Requests:
|
||||
ui_target: str = ""
|
||||
ui_target_id: str = ""
|
||||
pass_events: bool = False
|
||||
pass_ui_objects: list = field(default_factory = lambda: [])
|
||||
bind_keys: list = field(default_factory = lambda: [])
|
||||
@@ -6,8 +6,8 @@ from os.path import join
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
from .dto.manifest_meta import ManifestMeta
|
||||
from .dto.manifest import Manifest
|
||||
from libs.dto.plugins.manifest_meta import ManifestMeta
|
||||
from libs.dto.plugins.manifest import Manifest
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ class PluginBaseException(Exception):
|
||||
|
||||
|
||||
class PluginBase:
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(PluginBase, self).__init__(*args, **kwargs)
|
||||
self.name = "Example Plugin" # NOTE: Need to remove after establishing private bidirectional 1-1 message bus
|
||||
# where self.name should not be needed for message comms
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ import gi
|
||||
from gi.repository import GLib
|
||||
|
||||
# Application imports
|
||||
from .dto.manifest_meta import ManifestMeta
|
||||
from libs.dto.plugins.manifest_meta import ManifestMeta
|
||||
|
||||
from .plugin_reload_mixin import PluginReloadMixin
|
||||
from .manifest_manager import ManifestManager
|
||||
|
||||
|
||||
Reference in New Issue
Block a user