1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

Browser: Provide ability to create new browser windows

This change allows a user to spawn new browser processes by either
going to "File -> New Window" or by the shortcut "Ctrl + N".
This commit is contained in:
Kemal Zebari 2022-10-06 01:34:25 -07:00 committed by Sam Atkins
parent 48389f4179
commit 90719d34af
4 changed files with 21 additions and 0 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -32,6 +33,15 @@ WindowActions::WindowActions(GUI::Window& window)
&window);
m_create_new_tab_action->set_status_tip("Open a new tab");
m_create_new_window_action = GUI::Action::create(
"&New Window", { Mod_Ctrl, Key_N }, g_icon_bag.go_to, [this](auto&) {
if (on_create_new_window) {
on_create_new_window();
}
},
&window);
m_create_new_window_action->set_status_tip("Open a new browser window");
m_next_tab_action = GUI::Action::create(
"&Next Tab", { Mod_Ctrl, Key_PageDown }, [this](auto&) {
if (on_next_tab)