mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Ladybird/Qt: Move "About Ladybird" action to Help menu
This commit is contained in:
committed by
Tim Flynn
parent
9065b0b0f6
commit
d9f8203021
@@ -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);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user