diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-23 21:27:34 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-23 21:28:25 +0200 |
commit | 476a4475e572b22128557f1d8a05bf6d948b56ac (patch) | |
tree | 7c8dbeb6f822f47c2d5f80bca9a37196232fdebf /Applications/Browser/Tab.cpp | |
parent | 4e8b6e48fd5b45ec8c39f2e4661596d3019e3907 (diff) | |
download | serenity-476a4475e572b22128557f1d8a05bf6d948b56ac.zip |
Browser: Add "New tab" action (Ctrl+T) :^)
This also introduces a WindowActions collection of actions that are not
specific to the currently open tab, but nevertheless part of its menus.
Diffstat (limited to 'Applications/Browser/Tab.cpp')
-rw-r--r-- | Applications/Browser/Tab.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Applications/Browser/Tab.cpp b/Applications/Browser/Tab.cpp index b48cfdc1bd..7743ca48ba 100644 --- a/Applications/Browser/Tab.cpp +++ b/Applications/Browser/Tab.cpp @@ -26,6 +26,7 @@ #include "Tab.h" #include "BookmarksBarWidget.h" +#include "WindowActions.h" #include "History.h" #include "InspectorWidget.h" #include <LibGUI/AboutDialog.h> @@ -176,6 +177,8 @@ Tab::Tab() m_menubar = GUI::MenuBar::construct(); auto& app_menu = m_menubar->add_menu("Browser"); + app_menu.add_action(WindowActions::the().create_new_tab_action()); + app_menu.add_action(GUI::Action::create("Reload", { Mod_None, Key_F5 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/reload.png"), [this](auto&) { TemporaryChange<bool> change(m_should_push_loads_to_history, false); m_html_widget->reload(); |