Repository navigation
action-layout-editor: Fix actions-tree.md (file path, uuid format, accelerator) - #3912
Merged
Merged
Conversation
The page did not match what Nemo reads and what the layout editor writes: - The layout file is ~/.config/nemo/actions-tree.json, not ~/.config/nemo/actions/actions-tree.json. - An action's uuid is its file name including the .nemo_action extension (spices-based actions too). The @UNTRACKED suffix is never written by the editor, and on Nemo up to 6.8.5 a uuid without the extension crashes Nemo at startup (fixed by linuxmint#3905). - Document the accelerator key. - Remove position, which the editor no longer writes and Nemo ignores. - Say that children is required for a submenu. The example now uses the same format as the editor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
As I mentioned in #3905,
action-layout-editor/actions-tree.mddoesn't match the code (that page is where the@untrackedform comes from), so here is the separate PR. I compared the page with the code and with the file the layout editor writes, and here is what I found:~/.config/nemo/actions/actions-tree.json, but Nemo and the editor both use~/.config/nemo/actions-tree.json(LAYOUT_FILENAMEinnemo-action-manager.c,JSON_FILEin the editor). A file in theactions/folder is never read.uuid: the editor writes the action file's name with its.nemo_actionextension (file.name), spices-based actions included.NON_SPICE_UUID_SUFFIX = "@untracked"is defined in the editor but never used. On released versions up to 6.8.5 (I tested 6.8.4 and 6.8.5), a uuid without the extension, like the@untrackedform, makes Nemo crash at startup: that is the double free fixed by nemo-ui-utilities.c: Fix double free in nemo_make_action_uuid_for_path() #3905. On master it no longer crashes, butfoo@untrackedis not found, so the entry is ignored.accelerator: not mentioned, although the editor writes it and the C code reads it (nullor""means no shortcut). I use it myself (<Primary>Returnon an action) and it works.position: the page already says it is ignored, and the editor no longer writes it, so I removed it from the list and from the example.children: I added that it is required. If I read the code correctly, a submenu without it logs "Layout submenu is missing mandatory 'children' field" and the whole layout falls back to the flat list.I guess this went unnoticed because most people use the layout editor, which writes the correct format; only people writing the file by hand would follow this page. One public repo I found follows it: its installer copies the file to the path from the page, so Nemo never reads it.
The example now uses the same format as the editor. I kept the original names, just with the extension.
How I tested it
On the Nemo 6.8.5 package (CachyOS), in a separate D-Bus session with temporary
XDG_CONFIG_HOMEandXDG_DATA_HOME:g_critical(read);@untrackeduuid at the code path: crash (rc 134);name@author.nemo_action) and anaccelerator: no error.I also compared with my own
actions-tree.jsonwritten by the editor, and with five public files made by the editor. Packages are built withoutENABLE_DEBUG, so I couldn't see in the log which actions were added; on a debug build of master I sawfoo@untrackedreported as a missing action. It is a small test on my own two machines, not a full review of the editor.This only changes the doc page. If any of this is intentional (for example if
@untrackedis planned for later), let me know and I'll adjust it, or feel free to close this.🤖 Generated with Claude Code