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:
committed by
Carlos R. Mafra
parent
def62293e9
commit
d53b43608a
@@ -119,13 +119,11 @@ void parse_xdg(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEn
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (strcmp(p, "[Desktop Entry]") == 0) {
|
if (strcmp(p, "[Desktop Entry]") == 0) {
|
||||||
if (InGroup) {
|
/* if currently processing a group, we've just hit the
|
||||||
/* if currently processing a group, we've just hit the
|
* end of its definition, try processing it
|
||||||
* end of its definition, try processing it
|
*/
|
||||||
*/
|
if (InGroup && xdg_to_wm(&xdg, &wm)) {
|
||||||
if (xdg_to_wm(&xdg, &wm)) {
|
(*addWMMenuEntryCallback)(wm);
|
||||||
(*addWMMenuEntryCallback)(wm);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
init_xdg_storage(&xdg);
|
init_xdg_storage(&xdg);
|
||||||
init_wm_storage(&wm);
|
init_wm_storage(&wm);
|
||||||
@@ -180,8 +178,10 @@ void parse_xdg(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEn
|
|||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
/* at the end of the file, might as well try to menuize what we have */
|
/* at the end of the file, might as well try to menuize what we have
|
||||||
if (xdg_to_wm(&xdg, &wm))
|
* unless there was no group at all or it was marked as hidden
|
||||||
|
*/
|
||||||
|
if (InGroup && xdg_to_wm(&xdg, &wm))
|
||||||
(*addWMMenuEntryCallback)(wm);
|
(*addWMMenuEntryCallback)(wm);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user