| 278 | } |
| 279 | |
| 280 | void |
| 281 | PluginDeclaration::remove_menu_items (Dispatcher *dispatcher) |
| 282 | { |
| 283 | lay::AbstractMenu *menu = dispatcher->menu (); |
| 284 | menu->delete_items (mp_editable_mode_action.get ()); |
| 285 | menu->delete_items (mp_mouse_mode_action.get ()); |
| 286 | |
| 287 | std::vector<lay::Action *> actions; |
| 288 | for (tl::weak_collection <lay::Action>::iterator a = m_menu_actions.begin (); a != m_menu_actions.end (); ++a) { |
| 289 | if (a.operator-> ()) { |
| 290 | actions.push_back (a.operator-> ()); |
| 291 | } |
| 292 | } |
| 293 | for (std::vector<lay::Action *>::const_iterator a = actions.begin (); a != actions.end (); ++a) { |
| 294 | menu->delete_items (*a); |
| 295 | } |
| 296 | m_menu_actions.clear (); |
| 297 | } |
| 298 | |
| 299 | void |
| 300 | PluginDeclaration::set_editable_enabled (bool f) |
no test coverage detected