mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ladybird/Qt: Move "About Ladybird" action to Help menu
This commit is contained in:
parent
9065b0b0f6
commit
d9f8203021
Notes:
sideshowbarker
2024-07-18 03:35:30 +09:00
Author: https://github.com/jamierocks Commit: https://github.com/SerenityOS/serenity/commit/d9f8203021 Pull-request: https://github.com/SerenityOS/serenity/pull/24224
1 changed files with 5 additions and 5 deletions
|
@ -74,11 +74,6 @@ BrowserWindow::BrowserWindow(Vector<URL::URL> const& initial_urls, WebView::Cook
|
||||||
|
|
||||||
auto* menu = menuBar()->addMenu("&File");
|
auto* menu = menuBar()->addMenu("&File");
|
||||||
|
|
||||||
auto* about_action = new QAction("&About Ladybird", this);
|
|
||||||
menu->addAction(about_action);
|
|
||||||
|
|
||||||
menu->addSeparator();
|
|
||||||
|
|
||||||
m_new_tab_action = new QAction("New &Tab", this);
|
m_new_tab_action = new QAction("New &Tab", this);
|
||||||
m_new_tab_action->setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::AddTab));
|
m_new_tab_action->setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::AddTab));
|
||||||
menu->addAction(m_new_tab_action);
|
menu->addAction(m_new_tab_action);
|
||||||
|
@ -390,9 +385,14 @@ BrowserWindow::BrowserWindow(Vector<URL::URL> const& initial_urls, WebView::Cook
|
||||||
debug_request("same-origin-policy", state ? "on" : "off");
|
debug_request("same-origin-policy", state ? "on" : "off");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
auto* help_menu = menuBar()->addMenu("&Help");
|
||||||
|
|
||||||
|
auto* about_action = new QAction("&About Ladybird", this);
|
||||||
|
help_menu->addAction(about_action);
|
||||||
QObject::connect(about_action, &QAction::triggered, this, [this] {
|
QObject::connect(about_action, &QAction::triggered, this, [this] {
|
||||||
new_tab_from_url("about:version"sv, Web::HTML::ActivateTab::Yes);
|
new_tab_from_url("about:version"sv, Web::HTML::ActivateTab::Yes);
|
||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(m_new_tab_action, &QAction::triggered, this, [this] {
|
QObject::connect(m_new_tab_action, &QAction::triggered, this, [this] {
|
||||||
new_tab_from_url(ak_url_from_qstring(Settings::the()->new_tab_page()), Web::HTML::ActivateTab::Yes);
|
new_tab_from_url(ak_url_from_qstring(Settings::the()->new_tab_page()), Web::HTML::ActivateTab::Yes);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue