mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
UI/AppKit: Add a menu item to open about:settings
This commit is contained in:
parent
b169a98495
commit
7a5387b0ab
|
|
@ -214,6 +214,13 @@
|
||||||
[controller onCreateNewTab];
|
[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
|
- (void)closeCurrentTab:(id)sender
|
||||||
{
|
{
|
||||||
auto* current_window = [NSApp keyWindow];
|
auto* current_window = [NSApp keyWindow];
|
||||||
|
|
@ -403,6 +410,11 @@
|
||||||
keyEquivalent:@""]];
|
keyEquivalent:@""]];
|
||||||
[submenu addItem:[NSMenuItem separatorItem]];
|
[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]
|
[submenu addItem:[[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@"Hide %@", process_name]
|
||||||
action:@selector(hide:)
|
action:@selector(hide:)
|
||||||
keyEquivalent:@"h"]];
|
keyEquivalent:@"h"]];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user