Refactor plugin event API: rename message* to emit* and requests_ui_element to request_ui_element
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
from libs.controllers.controller_base import ControllerBase
|
||||
from libs.event_factory import Event_Factory, Code_Event_Types
|
||||
|
||||
from libs.dto.states import SourceViewStates
|
||||
|
||||
from ...source_view import SourceView
|
||||
|
||||
from .state_manager import SourceViewStateManager
|
||||
@@ -74,8 +76,8 @@ class SourceViewsController(ControllerBase, list):
|
||||
|
||||
source_view.set_buffer(event.next_file.buffer)
|
||||
|
||||
def create_source_view(self):
|
||||
source_view: SourceView = SourceView()
|
||||
def create_source_view(self, state: SourceViewStates = SourceViewStates.INSERT):
|
||||
source_view: SourceView = SourceView(state)
|
||||
source_view.command = self._get_command_system()
|
||||
source_view.command.set_data(source_view)
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ class Window(Gtk.ApplicationWindow):
|
||||
event_system.subscribe("load-interactive-debug", self._load_interactive_debug)
|
||||
|
||||
def _load_widgets(self):
|
||||
widget_registery.expose_object("main-window", self)
|
||||
|
||||
if settings_manager.is_debug():
|
||||
self.set_interactive_debugging(True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user