From 59b1dfa4e5078d1e86ec9173515f718a847f82ff Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 4 Nov 2022 23:58:11 -0400 Subject: [PATCH] Browser: Rename "take screenshot" action to "take visible screenshot" This is to differentiate between this and an upcoming action to take a screenshot of the entire document. --- Userland/Applications/Browser/BrowserWindow.cpp | 6 +++--- Userland/Applications/Browser/BrowserWindow.h | 4 ++-- Userland/Applications/Browser/Tab.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 0a0f056ef9..729d61dbfc 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -244,13 +244,13 @@ void BrowserWindow::build_menus() this); m_inspect_dom_node_action->set_status_tip("Open inspector for this element"); - m_take_screenshot_action = GUI::Action::create( - "&Take Screenshot"sv, g_icon_bag.filetype_image, [this](auto&) { + m_take_visible_screenshot_action = GUI::Action::create( + "Take &Visible Screenshot"sv, g_icon_bag.filetype_image, [this](auto&) { if (auto result = take_screenshot(); result.is_error()) GUI::MessageBox::show_error(this, String::formatted("{}", result.error())); }, this); - m_take_screenshot_action->set_status_tip("Save a screenshot of the current tab to the Downloads directory"sv); + m_take_visible_screenshot_action->set_status_tip("Save a screenshot of the visible portion of the current tab to the Downloads directory"sv); auto& inspect_menu = add_menu("&Inspect"); inspect_menu.add_action(*m_view_source_action); diff --git a/Userland/Applications/Browser/BrowserWindow.h b/Userland/Applications/Browser/BrowserWindow.h index 89f193a68b..94ee02cafc 100644 --- a/Userland/Applications/Browser/BrowserWindow.h +++ b/Userland/Applications/Browser/BrowserWindow.h @@ -39,7 +39,7 @@ public: GUI::Action& view_source_action() { return *m_view_source_action; } GUI::Action& inspect_dom_tree_action() { return *m_inspect_dom_tree_action; } GUI::Action& inspect_dom_node_action() { return *m_inspect_dom_node_action; } - GUI::Action& take_screenshot_action() { return *m_take_screenshot_action; } + GUI::Action& take_visible_screenshot_action() { return *m_take_visible_screenshot_action; } void content_filters_changed(); void proxy_mappings_changed(); @@ -70,7 +70,7 @@ private: RefPtr m_view_source_action; RefPtr m_inspect_dom_tree_action; RefPtr m_inspect_dom_node_action; - RefPtr m_take_screenshot_action; + RefPtr m_take_visible_screenshot_action; CookieJar& m_cookie_jar; WindowActions m_window_actions; diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index e910a3621a..4af1f63269 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -405,7 +405,7 @@ Tab::Tab(BrowserWindow& window) m_page_context_menu->add_action(window.inspect_dom_tree_action()); m_page_context_menu->add_action(window.inspect_dom_node_action()); m_page_context_menu->add_separator(); - m_page_context_menu->add_action(window.take_screenshot_action()); + m_page_context_menu->add_action(window.take_visible_screenshot_action()); view().on_context_menu_request = [&](auto& screen_position) { m_page_context_menu->popup(screen_position); };