mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +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];
|
[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…
Add table
Add a link
Reference in a new issue