* Determine if a menu is empty. * A menu is considered empty if it contains no or only * invisible entries. */
| 604 | * invisible entries. |
| 605 | */ |
| 606 | bool menu_is_empty(struct menu *menu) |
| 607 | { |
| 608 | struct menu *child; |
| 609 | |
| 610 | for (child = menu->list; child; child = child->next) { |
| 611 | if (menu_is_visible(child)) |
| 612 | return(false); |
| 613 | } |
| 614 | return(true); |
| 615 | } |
| 616 | |
| 617 | bool menu_is_visible(struct menu *menu) |
| 618 | { |
no test coverage detected