1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:57:45 +00:00

Userland: Turn all application menus into window menus :^)

This commit is contained in:
Andreas Kling 2021-03-25 21:41:39 +01:00
parent fcc8e3484f
commit 78b12e1521
47 changed files with 100 additions and 110 deletions

View file

@ -428,7 +428,7 @@ int main(int argc, char** argv)
auto menubar = GUI::MenuBar::construct();
auto& app_menu = menubar->add_menu("Terminal");
auto& app_menu = menubar->add_menu("File");
app_menu.add_action(GUI::Action::create("Open new Terminal", { Mod_Ctrl | Mod_Shift, Key_N }, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"), [&](auto&) {
pid_t child;
const char* argv[] = { "Terminal", nullptr };
@ -473,7 +473,8 @@ int main(int argc, char** argv)
}));
help_menu.add_action(GUI::CommonActions::make_about_action("Terminal", app_icon, window));
app->set_menubar(move(menubar));
window->set_menubar(menubar);
window->set_menubar(menubar);
if (unveil("/res", "r") < 0) {
perror("unveil");