diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-12-09 21:05:28 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-12-09 21:05:44 +0100 |
commit | fd5eb79d1959cbd4b43f624e3e0779e5dd5e0f17 (patch) | |
tree | 5898af512fb7afcdf185cf3dcec6ad449836022f /Applications/FileManager | |
parent | e9dda8d59261d021d046074f39bc2c0a140a723a (diff) | |
download | serenity-fd5eb79d1959cbd4b43f624e3e0779e5dd5e0f17.zip |
LibGUI: Make GMenu inherit from CObject
This is primarily to make it possible to pass a GMenu* where a CObject*
is expected.
Diffstat (limited to 'Applications/FileManager')
-rw-r--r-- | Applications/FileManager/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp index ff84f6a7be..ccbd71e013 100644 --- a/Applications/FileManager/main.cpp +++ b/Applications/FileManager/main.cpp @@ -322,7 +322,7 @@ int main(int argc, char** argv) auto menubar = make<GMenuBar>(); - auto app_menu = make<GMenu>("File Manager"); + auto app_menu = GMenu::construct("File Manager"); app_menu->add_action(mkdir_action); app_menu->add_action(copy_action); app_menu->add_action(paste_action); @@ -333,19 +333,19 @@ int main(int argc, char** argv) })); menubar->add_menu(move(app_menu)); - auto view_menu = make<GMenu>("View"); + auto view_menu = GMenu::construct("View"); view_menu->add_action(*view_as_icons_action); view_menu->add_action(*view_as_table_action); menubar->add_menu(move(view_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); go_menu->add_action(open_parent_directory_action); go_menu->add_action(go_home_action); menubar->add_menu(move(go_menu)); - auto help_menu = make<GMenu>("Help"); + auto help_menu = GMenu::construct("Help"); help_menu->add_action(GAction::create("About", [](const GAction&) { dbgprintf("FIXME: Implement Help/About\n"); })); @@ -412,14 +412,14 @@ int main(int argc, char** argv) } }); - auto directory_context_menu = make<GMenu>(); + auto directory_context_menu = GMenu::construct(); directory_context_menu->add_action(copy_action); directory_context_menu->add_action(paste_action); directory_context_menu->add_action(delete_action); directory_context_menu->add_separator(); directory_context_menu->add_action(properties_action); - auto file_context_menu = make<GMenu>(); + auto file_context_menu = GMenu::construct(); file_context_menu->add_action(copy_action); file_context_menu->add_action(paste_action); file_context_menu->add_action(delete_action); @@ -428,7 +428,7 @@ int main(int argc, char** argv) file_context_menu->add_separator(); file_context_menu->add_action(properties_action); - auto directory_view_context_menu = make<GMenu>(); + auto directory_view_context_menu = GMenu::construct(); directory_view_context_menu->add_action(mkdir_action); directory_view->on_context_menu_request = [&](const GAbstractView&, const GModelIndex& index, const GContextMenuEvent& event) { |