mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
UI/AppKit: Add a menu item to open about:settings
This commit is contained in:
parent
17480a6a90
commit
f9d3818e65
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