mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
ec0ca5a3f6
- 将 refresh_undo_redo_buttons 提升为公共函数(声明在 callbacks_internal.h,实现在 callbacks.c) - 在所有 push_record 的操作回调末尾调用 refresh_undo_redo_buttons,确保按钮状态实时更新 - 修复 redo() 中 OP_CLEAN/OP_IMPORT 的 new_paths 空指针风险 - 移除 undo_redo.c 中废弃的 apply_record 函数 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
27 lines
731 B
C
27 lines
731 B
C
#ifndef CALLBACKS_INTERNAL_H
|
|
#define CALLBACKS_INTERNAL_H
|
|
|
|
#include <iup.h>
|
|
#include "core/app_context.h"
|
|
#include "utils/i18n.h"
|
|
|
|
// 内部辅助函数声明(供各 callbacks_*.c 文件共享)
|
|
// 这些函数不对外暴露,仅在 controller 层内部使用
|
|
|
|
// 获取主对话框句柄
|
|
Ihandle *get_main_dlg(void);
|
|
|
|
// 从对话框获取应用上下文
|
|
AppContext *get_app_context_from_dlg(Ihandle *dlg);
|
|
|
|
// 获取当前活动的数据列表(根据 Tab 页切换)
|
|
StringList *get_current_raw_data(Ihandle *dlg);
|
|
|
|
// 获取当前活动的列表 UI 控件
|
|
Ihandle *get_current_list(Ihandle *dlg);
|
|
|
|
// 刷新撤销/重做按钮的启用状态
|
|
void refresh_undo_redo_buttons(Ihandle *dlg);
|
|
|
|
#endif // CALLBACKS_INTERNAL_H
|