diff --git a/TeXmacs/progs/generic/insert-menu.scm b/TeXmacs/progs/generic/insert-menu.scm index 54c48226d6..bbf5902022 100644 --- a/TeXmacs/progs/generic/insert-menu.scm +++ b/TeXmacs/progs/generic/insert-menu.scm @@ -144,7 +144,8 @@ (if (detailed-menus?) (if (style-has? "std-fold-dtd") (-> "Fold" (link insert-fold-menu))) - (-> "Animation" (link insert-animation-menu))) + (if (with-developer-tool?) + (-> "Animation" (link insert-animation-menu)))) (if (and (style-has? "session-dtd") (detailed-menus?) (not (in-math?))) (-> "Session" (link insert-session-menu)))) diff --git a/TeXmacs/progs/texmacs/menus/view-menu.scm b/TeXmacs/progs/texmacs/menus/view-menu.scm index 2fe31719d8..041964577a 100644 --- a/TeXmacs/progs/texmacs/menus/view-menu.scm +++ b/TeXmacs/progs/texmacs/menus/view-menu.scm @@ -149,6 +149,6 @@ (if (with-developer-tool?) ("Left side tools" (toggle-visible-side-tools 1)) ("Right side tools" (toggle-visible-side-tools 0)) - ("GUI through markup" (toggle-markup-gui))) - --- - ("Animation toolbar" (toggle-bottom-bar "animate"))) + ("GUI through markup" (toggle-markup-gui)) + --- + ("Animation toolbar" (toggle-bottom-bar "animate")))) diff --git a/devel/222_83.md b/devel/222_83.md new file mode 100644 index 0000000000..fe2c957adb --- /dev/null +++ b/devel/222_83.md @@ -0,0 +1,70 @@ +# [222_83] 动画工具栏仅在开发工具模式下启用 + +## 相关文档 +- [x_y.md](x_y.md) - 开发文档模板 + +## 任务相关的代码文件 +- `TeXmacs/progs/texmacs/menus/view-menu.scm` +- `TeXmacs/progs/generic/insert-menu.scm` +- `TeXmacs/progs/texmacs/menus/tools-menu.scm` +- `TeXmacs/progs/kernel/texmacs/tm-modes.scm` + +## 如何测试 +1. 启动 Mogan +2. 点击 `查看` 菜单,确认没有 `动画工具栏` 选项 +3. 点击 `插入` 菜单,确认没有 `动画` 子菜单 +4. 点击 `工具 -> 开发工具`,勾选启用开发工具 +5. 再次点击 `查看` 菜单,确认出现 `动画工具栏` 选项 +6. 再次点击 `插入` 菜单,确认出现 `动画` 子菜单 +7. 点击 `动画工具栏`,确认底部动画工具栏正常显示和工作 + +## 如何提交 +```bash +# 提交前执行的最少测试步骤 +xmake build mogan +./build/mogan +``` + +## 2026/05/08 将动画相关菜单放入开发工具条件分支 + +### What +将 `查看` 菜单中的 `动画工具栏` 选项和 `插入` 菜单中的 `动画` 子菜单移到 `(if (with-developer-tool?) ...)` 条件内,使其仅在开发工具开启时可见。 + +### Why +动画相关功能目前还不成熟,不应向普通用户暴露该入口。开发工具模式面向开发者,允许访问实验性功能。 + +### How +在 `view-menu.scm` 中,将原来的: +```scheme + (if (with-developer-tool?) + ("Left side tools" (toggle-visible-side-tools 1)) + ("Right side tools" (toggle-visible-side-tools 0)) + ("GUI through markup" (toggle-markup-gui))) + --- + ("Animation toolbar" (toggle-bottom-bar "animate")) +``` +改为: +```scheme + (if (with-developer-tool?) + ("Left side tools" (toggle-visible-side-tools 1)) + ("Right side tools" (toggle-visible-side-tools 0)) + ("GUI through markup" (toggle-markup-gui)) + --- + ("Animation toolbar" (toggle-bottom-bar "animate"))) +``` + +在 `insert-menu.scm` 中,将原来的: +```scheme + (if (detailed-menus?) + (if (style-has? "std-fold-dtd") + (-> "Fold" (link insert-fold-menu))) + (-> "Animation" (link insert-animation-menu))) +``` +改为: +```scheme + (if (detailed-menus?) + (if (style-has? "std-fold-dtd") + (-> "Fold" (link insert-fold-menu))) + (if (with-developer-tool?) + (-> "Animation" (link insert-animation-menu)))) +```