mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
IRCClient: Add menus.
This commit is contained in:
parent
746144f783
commit
5c2d405e1f
6 changed files with 75 additions and 34 deletions
|
@ -29,7 +29,7 @@ GMenu::~GMenu()
|
|||
unrealize_menu();
|
||||
}
|
||||
|
||||
void GMenu::add_action(RetainPtr<GAction>&& action)
|
||||
void GMenu::add_action(Retained<GAction>&& action)
|
||||
{
|
||||
m_items.append(make<GMenuItem>(move(action)));
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
|
||||
GAction* action_at(int);
|
||||
|
||||
void add_action(RetainPtr<GAction>&&);
|
||||
void add_action(Retained<GAction>&&);
|
||||
void add_separator();
|
||||
|
||||
Function<void(unsigned)> on_item_activation;
|
||||
|
|
|
@ -6,7 +6,7 @@ GMenuItem::GMenuItem(Type type)
|
|||
{
|
||||
}
|
||||
|
||||
GMenuItem::GMenuItem(RetainPtr<GAction>&& action)
|
||||
GMenuItem::GMenuItem(Retained<GAction>&& action)
|
||||
: m_type(Action)
|
||||
, m_action(move(action))
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ public:
|
|||
enum Type { Invalid, Action, Separator };
|
||||
|
||||
explicit GMenuItem(Type);
|
||||
explicit GMenuItem(RetainPtr<GAction>&&);
|
||||
explicit GMenuItem(Retained<GAction>&&);
|
||||
~GMenuItem();
|
||||
|
||||
Type type() const { return m_type; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue