Load files from IPC to code view; fixed tabs close all; corrected app.py logging

This commit is contained in:
2026-02-17 01:52:29 -06:00
parent d4dc972c6d
commit 69c8418a72
3 changed files with 12 additions and 1 deletions

View File

@@ -43,7 +43,7 @@ class Application:
if ipc_server.is_ipc_alive:
return True
logger.warning(f"{app_name} IPC Server Exists: Have sent path(s) to it and closing...")
logger.warning(f"{APP_NAME} IPC Server Exists: Have sent path(s) to it and closing...")
for arg in unknownargs + [args.new_tab,]:
if os.path.isfile(arg):
message = f"FILE|{arg}"

View File

@@ -24,9 +24,13 @@ class CodeBase:
self.controller_manager: ControllerManager = ControllerManager()
self.miniview_widget: MiniViewWidget = MiniViewWidget()
self._subscribe_to_events()
self._load_controllers()
def _subscribe_to_events(self):
event_system.subscribe("handle-file", self._load_ipc_file)
def _load_controllers(self):
files_controller = FilesController()
tabs_controller = TabsController()
@@ -59,3 +63,8 @@ class CodeBase:
def first_map_load(self):
self.controller_manager["source_views"].first_map_load()
def _load_ipc_file(self, fpath: str):
active_view = self.controller_manager["source_views"].signal_mapper.active_view
uris = [ f"file://{fpath}" ]
active_view._on_uri_data_received(uris)

View File

@@ -146,6 +146,8 @@ class TabsWidget(Gtk.Notebook):
self.close_right_items(menu_item, page_widget)
def close_all_items(self, menu_item, page_widget):
children = self.get_children()
for widget in children[ : ]:
tab = self.get_tab_label(widget)
tab.close_bttn.clicked()