| 1703 | } |
| 1704 | |
| 1705 | void |
| 1706 | AbstractMenu::clear_menu (const std::string &p) |
| 1707 | { |
| 1708 | typedef std::vector<std::pair<AbstractMenuItem *, std::list<AbstractMenuItem>::iterator > > path_type; |
| 1709 | tl::Extractor extr (p.c_str ()); |
| 1710 | path_type path = find_item (extr); |
| 1711 | if (! path.empty () && ! path.back ().second->children.empty ()) { |
| 1712 | path.back ().second->children.clear (); |
| 1713 | emit_changed (); |
| 1714 | } |
| 1715 | } |
| 1716 | |
| 1717 | void |
| 1718 | AbstractMenu::delete_item (const std::string &p) |