Commit 8c411815 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed delete menu item for the playlist table

(cherry picked from commit b54ea14fb14faa924b7353a4112ecab8c719b604)
parent 59947987
......@@ -97,6 +97,36 @@
}
}
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
if (([self numberOfSelectedRows] >= 1 && [item action] == @selector(delete:)) || [item action] == @selector(selectAll:))
return YES;
return NO;
}
- (BOOL) acceptsFirstResponder
{
return YES;
}
- (BOOL) becomeFirstResponder
{
[self setNeedsDisplay:YES];
return YES;
}
- (BOOL) resignFirstResponder
{
[self setNeedsDisplay:YES];
return YES;
}
- (IBAction)delete:(id)sender
{
[[[VLCMain sharedInstance] playlist] deleteItem: sender];
}
@end
/*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment