summaryrefslogtreecommitdiff
path: root/Userland/Applications/Browser/WindowActions.cpp
diff options
context:
space:
mode:
authorKemal Zebari <kemalzebra@gmail.com>2022-10-06 01:34:25 -0700
committerSam Atkins <atkinssj@gmail.com>2022-10-06 16:52:57 +0100
commit90719d34afc762f0e21a61c91a6f47d18d578ac0 (patch)
tree60a4bf1cd72bb161ce932103c20378351dac42a3 /Userland/Applications/Browser/WindowActions.cpp
parent48389f4179c734b412587f8d9da620688ff20d35 (diff)
downloadserenity-90719d34afc762f0e21a61c91a6f47d18d578ac0.zip
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".
Diffstat (limited to 'Userland/Applications/Browser/WindowActions.cpp')
-rw-r--r--Userland/Applications/Browser/WindowActions.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/WindowActions.cpp b/Userland/Applications/Browser/WindowActions.cpp
index 68a22afc89..c6ee0613d7 100644
--- a/Userland/Applications/Browser/WindowActions.cpp
+++ b/Userland/Applications/Browser/WindowActions.cpp
@@ -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)