mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:57:44 +00:00
Userland: Turn all application menus into window menus :^)
This commit is contained in:
parent
fcc8e3484f
commit
78b12e1521
47 changed files with 100 additions and 110 deletions
|
@ -888,7 +888,7 @@ void HackStudioWidget::create_action_tab(GUI::Widget& parent)
|
|||
|
||||
void HackStudioWidget::create_app_menubar(GUI::MenuBar& menubar)
|
||||
{
|
||||
auto& app_menu = menubar.add_menu("Hack Studio");
|
||||
auto& app_menu = menubar.add_menu("File");
|
||||
app_menu.add_action(*m_new_project_action);
|
||||
app_menu.add_action(*m_open_action);
|
||||
app_menu.add_action(*m_save_action);
|
||||
|
|
|
@ -99,7 +99,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
s_hack_studio_widget->initialize_menubar(menubar);
|
||||
app->set_menubar(menubar);
|
||||
s_window->set_menubar(menubar);
|
||||
|
||||
s_window->show();
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ int main(int argc, char** argv)
|
|||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto& app_menu = menubar->add_menu("Inspector");
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
|
@ -168,7 +168,7 @@ int main(int argc, char** argv)
|
|||
remote_process.set_inspected_object(remote_object->address);
|
||||
};
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
window->set_menubar(move(menubar));
|
||||
window->show();
|
||||
remote_process.update();
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ int main(int argc, char** argv)
|
|||
};
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto& app_menu = menubar->add_menu("GML Playground");
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
|
||||
app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) {
|
||||
Optional<String> open_path = GUI::FilePicker::get_open_filepath(window);
|
||||
|
@ -400,7 +400,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("GML Playground", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
window->set_menubar(move(menubar));
|
||||
|
||||
window->show();
|
||||
return app->exec();
|
||||
|
|
|
@ -141,7 +141,7 @@ int main(int argc, char** argv)
|
|||
};
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
auto& app_menu = menubar->add_menu("Profiler");
|
||||
auto& app_menu = menubar->add_menu("File");
|
||||
app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); }));
|
||||
|
||||
auto& view_menu = menubar->add_menu("View");
|
||||
|
@ -185,8 +185,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
help_menu.add_action(GUI::CommonActions::make_about_action("Profiler", app_icon, window));
|
||||
|
||||
app->set_menubar(move(menubar));
|
||||
|
||||
window->set_menubar(move(menubar));
|
||||
window->show();
|
||||
return app->exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue