mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
UI/AppKit: Add a menu item to open about:settings
This commit is contained in:
parent
b169a98495
commit
7a5387b0ab
Notes:
github-actions[bot]
2025-03-22 16:28:44 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/7a5387b0abb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4036
1 changed files with 12 additions and 0 deletions
|
@ -214,6 +214,13 @@
|
|||
[controller onCreateNewTab];
|
||||
}
|
||||
|
||||
- (void)openSettings:(id)sender
|
||||
{
|
||||
[self createNewTab:URL::URL::about("settings"_string)
|
||||
fromTab:self.active_tab
|
||||
activateTab:Web::HTML::ActivateTab::Yes];
|
||||
}
|
||||
|
||||
- (void)closeCurrentTab:(id)sender
|
||||
{
|
||||
auto* current_window = [NSApp keyWindow];
|
||||
|
@ -403,6 +410,11 @@
|
|||
keyEquivalent:@""]];
|
||||
[submenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
[submenu addItem:[[NSMenuItem alloc] initWithTitle:@"Settings"
|
||||
action:@selector(openSettings:)
|
||||
keyEquivalent:@","]];
|
||||
[submenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
[submenu addItem:[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"Hide %@", process_name]
|
||||
action:@selector(hide:)
|
||||
keyEquivalent:@"h"]];
|
||||
|
|
Loading…
Add table
Reference in a new issue