Reworked plugin manifest; decoupled event system and ipc
This commit is contained in:
3
plugins/file_properties/__main__.py
Normal file
3
plugins/file_properties/__main__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Pligin Package
|
||||
"""
|
12
plugins/file_properties/manifest.json
Normal file
12
plugins/file_properties/manifest.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"manifest": {
|
||||
"name": "Properties",
|
||||
"author": "ITDominator",
|
||||
"version": "0.0.1",
|
||||
"support": "",
|
||||
"requests": {
|
||||
"ui_target": "context_menu",
|
||||
"pass_fm_events": "true"
|
||||
}
|
||||
}
|
||||
}
|
@@ -25,17 +25,6 @@ def daemon_threaded(fn):
|
||||
|
||||
|
||||
|
||||
class Manifest:
|
||||
path: str = os.path.dirname(os.path.realpath(__file__))
|
||||
name: str = "Properties"
|
||||
author: str = "ITDominator"
|
||||
version: str = "0.0.1"
|
||||
support: str = ""
|
||||
requests: {} = {
|
||||
'ui_target': "context_menu",
|
||||
'pass_fm_events': "true"
|
||||
}
|
||||
|
||||
class Properties:
|
||||
file_uri: str = None
|
||||
file_name: str = None
|
||||
@@ -50,8 +39,11 @@ class Properties:
|
||||
chmod_stat: str = None
|
||||
|
||||
|
||||
class Plugin(Manifest):
|
||||
class Plugin:
|
||||
def __init__(self):
|
||||
self.path = os.path.dirname(os.path.realpath(__file__))
|
||||
self.name = "Properties" # NOTE: Need to remove after establishing private bidirectional 1-1 message bus
|
||||
# where self.name should not be needed for message comms
|
||||
self._GLADE_FILE = f"{self.path}/file_properties.glade"
|
||||
self._builder = None
|
||||
self._properties_dialog = None
|
||||
|
3
plugins/searcher/__main__.py
Normal file
3
plugins/searcher/__main__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Pligin Package
|
||||
"""
|
13
plugins/searcher/manifest.json
Normal file
13
plugins/searcher/manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"manifest": {
|
||||
"name": "Search",
|
||||
"author": "ITDominator",
|
||||
"version": "0.0.1",
|
||||
"support": "",
|
||||
"requests": {
|
||||
"ui_target": "context_menu",
|
||||
"pass_fm_events": "true",
|
||||
"bind_keys": ["Search||_show_grep_list_page:<Control>f"]
|
||||
}
|
||||
}
|
||||
}
|
@@ -25,21 +25,6 @@ def daemon_threaded(fn):
|
||||
|
||||
|
||||
|
||||
class Manifest:
|
||||
path: str = os.path.dirname(os.path.realpath(__file__))
|
||||
name: str = "Search"
|
||||
author: str = "ITDominator"
|
||||
version: str = "0.0.1"
|
||||
support: str = ""
|
||||
requests: {} = {
|
||||
'ui_target': "context_menu",
|
||||
'pass_fm_events': "true",
|
||||
'bind_keys': [f"{name}||_show_grep_list_page:<Control>f"]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class FilePreviewWidget(Gtk.LinkButton):
|
||||
def __init__(self, path, file):
|
||||
super(FilePreviewWidget, self).__init__()
|
||||
@@ -89,8 +74,11 @@ grep_result_set = manager.dict()
|
||||
file_result_set = manager.list()
|
||||
|
||||
|
||||
class Plugin(Manifest):
|
||||
class Plugin:
|
||||
def __init__(self):
|
||||
self.path = os.path.dirname(os.path.realpath(__file__))
|
||||
self.name = "Search" # NOTE: Need to remove after establishing private bidirectional 1-1 message bus
|
||||
# where self.name should not be needed for message comms
|
||||
self._GLADE_FILE = f"{self.path}/search_dialog.glade"
|
||||
self._builder = None
|
||||
self._search_dialog = None
|
||||
|
3
plugins/template/__main__.py
Normal file
3
plugins/template/__main__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Pligin Package
|
||||
"""
|
13
plugins/template/manifest.json
Normal file
13
plugins/template/manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"manifest": {
|
||||
"name": "Example Plugin",
|
||||
"author": "John Doe",
|
||||
"version": "0.0.1",
|
||||
"support": "",
|
||||
"requests": {
|
||||
"ui_target": "plugin_control_list",
|
||||
"pass_fm_events": "true",
|
||||
"bind_keys": ["Example Plugin||send_message:<Control>f"]
|
||||
}
|
||||
}
|
||||
}
|
@@ -24,21 +24,10 @@ def daemon_threaded(fn):
|
||||
|
||||
|
||||
|
||||
class Manifest:
|
||||
path: str = os.path.dirname(os.path.realpath(__file__))
|
||||
name: str = "Example Plugin"
|
||||
author: str = "John Doe"
|
||||
version: str = "0.0.1"
|
||||
support: str = ""
|
||||
requests: {} = {
|
||||
'ui_target': "plugin_control_list",
|
||||
'pass_fm_events': "true",
|
||||
'bind_keys': [f"{name}||send_message:<Control>f"]
|
||||
}
|
||||
|
||||
|
||||
class Plugin(Manifest):
|
||||
class Plugin:
|
||||
def __init__(self):
|
||||
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
|
||||
self._event_system = None
|
||||
self._event_sleep_time = .5
|
||||
self._event_message = None
|
||||
@@ -58,7 +47,6 @@ class Plugin(Manifest):
|
||||
|
||||
def send_message(self, widget=None, eve=None):
|
||||
message = "Hello, World!"
|
||||
print("here")
|
||||
self._event_system.push_gui_event([self.name, "display_message", ("warning", message, None)])
|
||||
|
||||
|
||||
|
3
plugins/vod_thumbnailer/__main__.py
Normal file
3
plugins/vod_thumbnailer/__main__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Pligin Package
|
||||
"""
|
12
plugins/vod_thumbnailer/manifest.json
Normal file
12
plugins/vod_thumbnailer/manifest.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"manifest": {
|
||||
"name": "VOD Thumbnailer",
|
||||
"author": "ITDominator",
|
||||
"version": "0.0.1",
|
||||
"support": "",
|
||||
"requests": {
|
||||
"ui_target": "context_menu",
|
||||
"pass_fm_events": "true"
|
||||
}
|
||||
}
|
||||
}
|
@@ -26,19 +26,11 @@ def daemon_threaded(fn):
|
||||
|
||||
|
||||
|
||||
class Manifest:
|
||||
path: str = os.path.dirname(os.path.realpath(__file__))
|
||||
name: str = "VOD Thumbnailer"
|
||||
author: str = "ITDominator"
|
||||
version: str = "0.0.1"
|
||||
support: str = ""
|
||||
requests: {} = {
|
||||
'ui_target': "context_menu",
|
||||
'pass_fm_events': "true"
|
||||
}
|
||||
|
||||
class Plugin(Manifest):
|
||||
class Plugin:
|
||||
def __init__(self):
|
||||
self.path = os.path.dirname(os.path.realpath(__file__))
|
||||
self.name = "VOD Thumbnailer" # NOTE: Need to remove after establishing private bidirectional 1-1 message bus
|
||||
# where self.name should not be needed for message comms
|
||||
self._GLADE_FILE = f"{self.path}/re_thumbnailer.glade"
|
||||
self._builder = None
|
||||
self._thumbnailer_dialog = None
|
||||
|
3
plugins/youtube_download/__main__.py
Normal file
3
plugins/youtube_download/__main__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
"""
|
||||
Pligin Package
|
||||
"""
|
12
plugins/youtube_download/manifest.json
Normal file
12
plugins/youtube_download/manifest.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"manifest": {
|
||||
"name": "Youtube Download",
|
||||
"author": "ITDominator",
|
||||
"version": "0.0.1",
|
||||
"support": "",
|
||||
"requests": {
|
||||
"ui_target": "plugin_control_list",
|
||||
"pass_fm_events": "true"
|
||||
}
|
||||
}
|
||||
}
|
@@ -24,21 +24,10 @@ def daemon_threaded(fn):
|
||||
|
||||
|
||||
|
||||
class Manifest:
|
||||
path: str = os.path.dirname(os.path.realpath(__file__))
|
||||
name: str = "Youtube Download"
|
||||
author: str = "ITDominator"
|
||||
version: str = "0.0.1"
|
||||
support: str = ""
|
||||
requests: {} = {
|
||||
'ui_target': "plugin_control_list",
|
||||
'pass_fm_events': "true"
|
||||
|
||||
}
|
||||
|
||||
|
||||
class Plugin(Manifest):
|
||||
class Plugin:
|
||||
def __init__(self):
|
||||
self.name = "Youtube Download" # NOTE: Need to remove after establishing private bidirectional 1-1 message bus
|
||||
# where self.name should not be needed for message comms
|
||||
self._event_system = None
|
||||
self._event_sleep_time = .5
|
||||
self._event_message = None
|
||||
|
Reference in New Issue
Block a user