mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
WindowServer: Add IPC call to remove a menu's item
This commit is contained in:
parent
b6eaefa87d
commit
8ede1a6a6f
5 changed files with 20 additions and 0 deletions
|
@ -562,6 +562,11 @@ MenuItem* Menu::item_with_identifier(unsigned identifier)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool Menu::remove_item_with_identifier(unsigned identifier)
|
||||
{
|
||||
return m_items.remove_first_matching([&](auto& item) { return item->identifier() == identifier; });
|
||||
}
|
||||
|
||||
int Menu::item_index_at(const Gfx::IntPoint& position)
|
||||
{
|
||||
int i = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue