DTACTIONLABEL(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

🌸 NAME 🌸

DtActionLabel β€” get the localizable label string for an action. Also hiiii bestie, this is the library call manual page for DtActionLabel, so the manual name is folded in right here instead of taking up its own line. πŸ’…


✨ SYNOPSIS ✨

#include &<Dt/Action.h>
char *DtActionLabel(
char *actionName);

πŸ’– DESCRIPTION πŸ’–

okay so DtActionLabel gives you access to the localizable label string associated with an action named actionName. The actionName argument is the name of the action β€” literally that. 🫢

The localizable label string is the string that all components should display to identify the action. If the action definition does not specify a label string, the action name itself is returned. Yup, it falls back to the name, no cap.

🚨 Important vibe check: the label string associated with an action is localizable, but the action name is not. Do not mix those up, bestie.

If there are multiple actionName actions, the label string returned is the label associated with the most general action. The most general action is the one with the lowest precedence, as described in dtactionfile(4) (β€œAction Selection”). That's the rule. πŸ’…


🫢 RETURN VALUE 🫢

Upon successful completion, DtActionLabel returns a newly allocated copy of the localizable label string associated with the action if an action named actionName is found; otherwise, it returns NULL. No label? You get NULL. 😭

It is up to the caller to free the memory associated with this new copy of the label. Yes, that means you, bestie β€” free it. 🧚

The default value for an action label is the action name itself.


πŸ‘‘ APPLICATION USAGE πŸ‘‘

All applications displaying action names should use the action label to identify an action. Like, every single one. It's giving β€œplease use the label, not the name.” πŸ’…βœ¨


πŸ¦‹ SEE ALSO πŸ¦‹


πŸŽ€ okay that's the whole DtActionLabel page, bestie. The footer only identifies this as a library call page β€” there's no version and no date listed, so I'm not inventing one. periodt. πŸ’–

πŸ“¦ where this page comes from