Files
Python-With-Gtk-Template/plugins/ui/template/plugin.py
itdominator 6714053776 Moved plugins and refactor command system
- Moved plugins to apropriate sub folders
- Refactor command system with new add_command method and rename GetCommandSystemEvent to GetNewCommandSystemEvent
- Add RegisterCommandEvent for dynamic command registration
- Change footer container orientation to VERTICAL
- Add search-highlight tag to source buffer
- Add file change detection (deleted, externally modified) in source_file
- Add JSON prettify option to source view popup menu
- Enable hexpand on VTE widget
- Update plugins_controller_mixin to use widget_registry
2026-02-18 23:47:19 -06:00

40 lines
846 B
Python

# Python imports
# Lib imports
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
# Application imports
from libs.dto.base_event import BaseEvent
from plugins.plugin_types import PluginUI
class Plugin(PluginUI):
def __init__(self):
super(Plugin, self).__init__()
def _controller_message(self, event: BaseEvent):
...
def load(self):
ui_element = self.requests_ui_element("header-container")
ui_element.add( self.generate_plugin_element() )
def run(self):
...
def generate_plugin_element(self):
button = Gtk.Button(label = "Hello, World!")
button.connect("button-release-event", self.send_message)
button.show()
return button
def send_message(self, widget = None, eve = None):
logger.info("Hello, World!")