mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
Ladybird+LibWeb: Add initial about:version internal page
This commit is contained in:
parent
05c0640474
commit
cde14901bc
7 changed files with 100 additions and 1 deletions
|
@ -148,6 +148,18 @@
|
|||
|
||||
#pragma mark - Private methods
|
||||
|
||||
- (void)openAboutVersionPage:(id)sender
|
||||
{
|
||||
auto* current_tab = [NSApp keyWindow];
|
||||
if (![current_tab isKindOfClass:[Tab class]]) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self createNewTab:URL("about:version"sv)
|
||||
fromTab:(Tab*)current_tab
|
||||
activateTab:Web::HTML::ActivateTab::Yes];
|
||||
}
|
||||
|
||||
- (nonnull TabController*)createNewTab:(Web::HTML::ActivateTab)activate_tab
|
||||
fromTab:(nullable Tab*)tab
|
||||
{
|
||||
|
@ -242,7 +254,7 @@
|
|||
auto* submenu = [[NSMenu alloc] initWithTitle:process_name];
|
||||
|
||||
[submenu addItem:[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"About %@", process_name]
|
||||
action:@selector(orderFrontStandardAboutPanel:)
|
||||
action:@selector(openAboutVersionPage:)
|
||||
keyEquivalent:@""]];
|
||||
[submenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue