1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 22:28:02 +01:00

wmmenugen: properly skip NoDispaly entries

Last group from a desktop file is always added to menu regardless of
NoDisplay property.  Properly handle the NoDisplay and Hidden properties
at the end of file.

Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
This commit is contained in:
Alexey I. Froloff
2012-06-19 02:25:14 +04:00
committed by Carlos R. Mafra
parent def62293e9
commit d53b43608a

View File

@@ -119,13 +119,11 @@ void parse_xdg(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEn
continue;
if (strcmp(p, "[Desktop Entry]") == 0) {
if (InGroup) {
/* if currently processing a group, we've just hit the
* end of its definition, try processing it
*/
if (xdg_to_wm(&xdg, &wm)) {
(*addWMMenuEntryCallback)(wm);
}
/* if currently processing a group, we've just hit the
* end of its definition, try processing it
*/
if (InGroup && xdg_to_wm(&xdg, &wm)) {
(*addWMMenuEntryCallback)(wm);
}
init_xdg_storage(&xdg);
init_wm_storage(&wm);
@@ -180,8 +178,10 @@ void parse_xdg(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEn
fclose(fp);
/* at the end of the file, might as well try to menuize what we have */
if (xdg_to_wm(&xdg, &wm))
/* at the end of the file, might as well try to menuize what we have
* unless there was no group at all or it was marked as hidden
*/
if (InGroup && xdg_to_wm(&xdg, &wm))
(*addWMMenuEntryCallback)(wm);
}