1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

wmmenugen: Add reserved categories.

From https://standards.freedesktop.org/menu-spec/latest/apas03.html:

Reserved Categories have a desktop-specific meaning that has not been
standardized (yet). Desktop entry files that use a reserved category MUST
also include an appropriate OnlyShowIn= entry to restrict themselves to
those environments that properly support the reserved category as used.
This commit is contained in:
Doug Torrance
2017-07-06 19:48:14 -04:00
committed by Carlos R. Mafra
parent c261f8ec35
commit ac0690b324

View File

@@ -535,6 +535,19 @@ static void getMenuHierarchyFor(char **xdgmenuspec)
} else if (strcmp(p, "Utility") == 0) {
snprintf(buf, sizeof(buf), "%s", _("Utility"));
break;
/* reserved categories */
} else if (strcmp(p, "Screensaver") == 0) {
snprintf(buf, sizeof(buf), "%s", _("Screensaver"));
break;
} else if (strcmp(p, "TrayIcon") == 0) {
snprintf(buf, sizeof(buf), "%s", _("Tray Icon"));
break;
} else if (strcmp(p, "Applet") == 0) {
snprintf(buf, sizeof(buf), "%s", _("Applet"));
break;
} else if (strcmp(p, "Shell") == 0) {
snprintf(buf, sizeof(buf), "%s", _("Shell"));
break;
}
p = strtok(NULL, ";");
}