Add interactive LSP completion with debounced requests and cancellation Support C source files in Tree-sitter parsing and code folding Fix search-and-replace selection handling Improve split-pane expansion and terminal initialization Configure custom Bash startup files and script paths Update WebKit2 requirements to version 4.1 Unify application event registration and preserve controller message results Rename the UI plugin exception and clean up event emission APIs Refine 'code' plugin 'search' field limits and related widget behavior
38 lines
1017 B
Python
38 lines
1017 B
Python
# Python imports
|
|
|
|
# Lib imports
|
|
import gi
|
|
from gi.repository import GLib
|
|
|
|
# Application imports
|
|
|
|
|
|
|
|
|
|
class IPCSignalsMixin:
|
|
""" IPCSignalsMixin handle messages from another starting {APP_NAME} process. """
|
|
|
|
def print_to_console(self, message = None):
|
|
logger.debug(message)
|
|
|
|
def handle_file_from_ipc(self, fpath: str) -> None:
|
|
logger.debug(f"File From IPC: {fpath}")
|
|
GLib.idle_add(
|
|
self.broadcast_message, "handle-file", (fpath, )
|
|
)
|
|
|
|
def handle_files_from_ipc(self, uris: list) -> None:
|
|
logger.debug(f"Files From IPC: {uris}")
|
|
GLib.idle_add(
|
|
self.broadcast_message, "handle-files", (uris, )
|
|
)
|
|
|
|
def handle_dir_from_ipc(self, fpath: str) -> None:
|
|
logger.debug(f"Dir From IPC: {fpath}")
|
|
GLib.idle_add(
|
|
self.broadcast_message, "handle-folder", (fpath, )
|
|
)
|
|
|
|
def broadcast_message(self, message_type: str = "none", data: () = ()) -> None:
|
|
event_system.emit(message_type, data)
|