mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-24 00:49:46 +00:00
LibWebView+UI: Generate actions to open about: pages
This commit is contained in:
parent
ce331cbcd5
commit
6d30b0f4d4
Notes:
github-actions[bot]
2025-09-18 11:28:53 +00:00
Author: https://github.com/trflynn89
Commit: 6d30b0f4d4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6221
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/konradekk
7 changed files with 45 additions and 55 deletions
|
|
@ -674,6 +674,15 @@ void Application::initialize_actions()
|
|||
view->select_all();
|
||||
});
|
||||
|
||||
m_open_about_page_action = Action::create("About Ladybird"sv, ActionID::OpenAboutPage, [this]() {
|
||||
open_url_in_new_tab(URL::about_version(), Web::HTML::ActivateTab::Yes);
|
||||
});
|
||||
m_open_processes_page_action = Action::create("Open Task Manager"sv, ActionID::OpenProcessesPage, [this]() {
|
||||
open_url_in_new_tab(URL::about_processes(), Web::HTML::ActivateTab::Yes);
|
||||
});
|
||||
m_open_settings_page_action = Action::create("Settings"sv, ActionID::OpenSettingsPage, [this]() {
|
||||
open_url_in_new_tab(URL::about_settings(), Web::HTML::ActivateTab::Yes);
|
||||
});
|
||||
m_view_source_action = Action::create("View Source"sv, ActionID::ViewSource, [this]() {
|
||||
if (auto view = active_web_view(); view.has_value())
|
||||
view->get_source();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue