Template
fix: clean up GTK/WebKit integration and event handling
- fix split pane expansion/orientation setup logic - remove deferred pane positioning on show events - load VTE with interactive bash rcfile - migrate WebKit2 bindings from 4.0 to 4.1 - add icons path accessor to PathManager - normalize startup IPC file event payloads with FILE| prefix - alias App_Event_Types and update plugin event references - guard widget registry against unnamed builder objects - fix application_dirs home path lookup - remove unused GLib import from completion controller - reorder setproctitle import in __main__
This commit is contained in:
@@ -31,7 +31,7 @@ class EventFactory(Singleton):
|
||||
event_type = self._class_name_to_event_type(name)
|
||||
|
||||
self._event_classes[event_type] = obj
|
||||
Code_Event_Types.add_event_class(name, obj)
|
||||
App_Event_Types.add_event_class(name, obj)
|
||||
i += 1
|
||||
|
||||
logger.debug(f"Registered {i} event types:")
|
||||
@@ -44,7 +44,7 @@ class EventFactory(Singleton):
|
||||
event_type = self._class_name_to_event_type(name)
|
||||
|
||||
del self._event_classes[event_type]
|
||||
Code_Event_Types.remove_event_class(name)
|
||||
App_Event_Types.remove_event_class(name)
|
||||
i += 1
|
||||
|
||||
logger.debug(f"Unregistered {i} event types:")
|
||||
@@ -98,6 +98,7 @@ class EventNamespace:
|
||||
|
||||
|
||||
|
||||
Code_Event_Types = EventNamespace()
|
||||
App_Event_Types = EventNamespace()
|
||||
Code_Event_Types = App_Event_Types
|
||||
Event_Factory = EventFactory()
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ class Config:
|
||||
main_window_height: int = 600
|
||||
application_dirs: list = field(default_factory=lambda: [
|
||||
"/usr/share/applications",
|
||||
f"{settings_manager.get_home_path()}/.local/share/applications"
|
||||
f"{settings_manager.path_manager.get_home_path()}/.local/share/applications"
|
||||
])
|
||||
|
||||
@@ -88,6 +88,7 @@ class PathManager:
|
||||
def get_ui_widgets_path(self) -> str: return self._UI_WIDGETS_PATH
|
||||
def get_context_path(self) -> str: return self._CONTEXT_PATH
|
||||
def get_plugins_path(self) -> str: return self._PLUGINS_PATH
|
||||
def get_icons_path(self) -> str: return self._DEFAULT_ICONS
|
||||
def get_css_file(self) -> str: return self._CSS_FILE
|
||||
def get_home_config_path(self) -> str: return self._HOME_CONFIG_PATH
|
||||
def get_window_icon(self) -> str: return self._WINDOW_ICON
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Lib imports
|
||||
import gi
|
||||
gi.require_version('WebKit2', '4.0')
|
||||
gi.require_version('WebKit2', '4.1')
|
||||
from gi.repository import WebKit2
|
||||
|
||||
# Application imports
|
||||
|
||||
@@ -30,6 +30,7 @@ class WidgetRegisteryController(ControllerBase):
|
||||
|
||||
widgets = self._builder.get_objects()
|
||||
for widget in widgets:
|
||||
if not hasattr(widget, "get_name"): continue
|
||||
self.builder_keys.append( widget.get_name() )
|
||||
|
||||
def _controller_message(self, event: BaseEvent):
|
||||
|
||||
Reference in New Issue
Block a user