mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:15:07 +00:00
LibGUI: Make GMenu inherit from CObject
This is primarily to make it possible to pass a GMenu* where a CObject* is expected.
This commit is contained in:
parent
e9dda8d592
commit
fd5eb79d19
39 changed files with 88 additions and 86 deletions
|
@ -129,7 +129,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
auto menubar = make<GMenuBar>();
|
||||
|
||||
auto app_menu = make<GMenu>("Help");
|
||||
auto app_menu = GMenu::construct("Help");
|
||||
app_menu->add_action(GAction::create("About", [&](const GAction&) {
|
||||
GAboutDialog::show("Help", load_png("/res/icons/16x16/book.png"), window);
|
||||
}));
|
||||
|
@ -139,7 +139,7 @@ int main(int argc, char* argv[])
|
|||
}));
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
auto go_menu = make<GMenu>("Go");
|
||||
auto go_menu = GMenu::construct("Go");
|
||||
go_menu->add_action(*go_back_action);
|
||||
go_menu->add_action(*go_forward_action);
|
||||
menubar->add_menu(move(go_menu));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue