From a06ece4e1551e22a8a795ceccbdb035ad1bbecff Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 30 May 2026 19:13:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor(gui):=20=5Fopen=5Frealtime=5Fviewer=20?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=AE=9A=E4=B9=89,=E5=88=A0=E9=99=A4=20forwa?= =?UTF-8?q?rd-declare=20=E6=A8=A1=E5=BC=8F=20(396=20=E2=86=92=20389)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/gui_app.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/gui/gui_app.py b/gui/gui_app.py index a6761e1..c5af049 100644 --- a/gui/gui_app.py +++ b/gui/gui_app.py @@ -222,11 +222,10 @@ def main(): # 右侧:操作按钮区域(先创建,放在底部) actions = ttk.Frame(right) - # forward-declare 实时查看弹窗,主函数后面才定义具体实现 - _open_realtime_viewer_impl = None - _open_realtime_viewer = lambda: ( - _open_realtime_viewer_impl() if callable(_open_realtime_viewer_impl) else None - ) + def _open_realtime_viewer(): + """委托到 gui/components/realtime_viewer.open_realtime_viewer。""" + from gui.components.realtime_viewer import open_realtime_viewer + open_realtime_viewer(root) # 右侧:Notebook(日志 / 截图预览 / 统计信息 / 预约队列 / 高价值房间) _main_nb = setup_main_notebook( @@ -271,12 +270,6 @@ def main(): read_config=read_config, ) - # --------- 实时查看弹窗(紧凑视图) --------- - def _open_realtime_viewer_impl(): - """委托到 gui/components/realtime_viewer.open_realtime_viewer。""" - from gui.components.realtime_viewer import open_realtime_viewer - open_realtime_viewer(root) - _preview_handles = setup_preview_tab( preview_tab, on_line=on_line,