Plugin ref update and cleanup

This commit is contained in:
itdominator 2022-06-14 22:57:54 -05:00
parent df68ce7a5b
commit 477ba79f93
1 changed files with 5 additions and 7 deletions

View File

@ -12,6 +12,8 @@ from gi.repository import Gtk, Gio
class Plugin: class Plugin:
name: str = None name: str = None
author: str = None
version: str = None
module: str = None module: str = None
reference: type = None reference: type = None
@ -60,6 +62,9 @@ class Plugins:
plugin_reference = app.Plugin(self._builder, event_system) plugin_reference = app.Plugin(self._builder, event_system)
plugin = Plugin() plugin = Plugin()
plugin.name = plugin_reference.get_plugin_name() plugin.name = plugin_reference.get_plugin_name()
plugin.author = plugin_reference.get_plugin_author()
plugin.version = plugin_reference.get_plugin_version()
plugin.module = path plugin.module = path
plugin.reference = plugin_reference plugin.reference = plugin_reference
@ -73,10 +78,3 @@ class Plugins:
def reload_plugins(self, file: str = None) -> None: def reload_plugins(self, file: str = None) -> None:
print(f"Reloading plugins... stub.") print(f"Reloading plugins... stub.")
def send_message_to_plugin(self, target: str , data: type) -> None:
print("Trying to send message to plugin...")
for plugin in self._plugin_collection:
if target in plugin.name:
print('Found plugin; posting message...')
plugin.reference.set_message(data)