Plugin ref update and cleanup
This commit is contained in:
		| @@ -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) |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user