Commit b54ea14f authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed delete menu item for the playlist table

parent 43452fac
......@@ -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