[_customize_vid_keep_ckb setTitle: _NS("Keep original video track")];
[_customize_vid_codec_lbl setStringValue: _NS("Codec")];
[_customize_vid_bitrate_lbl setStringValue: _NS("Bitrate")];
- [_customize_vid_framerate_lbl setStringValue: _NS("Frame Rate")];
+ [_customize_vid_framerate_lbl setStringValue: _NS("Frame rate")];
[_customize_vid_res_box setTitle: _NS("Resolution")];
[_customize_vid_res_lbl setStringValue: _NS("You just need to fill one of the three following parameters, VLC will autodetect the other using the original aspect ratio")];
[_customize_vid_width_lbl setStringValue: _NS("Width")];
[_customize_aud_samplerate_lbl setStringValue: _NS("Samplerate")];
[_customize_subs_ckb setTitle: _NS("Subtitles")];
[_customize_subs_overlay_ckb setTitle: _NS("Overlay subtitles on the video")];
- [_stream_ok_btn setTitle:_NS("OK")];
+ [_stream_ok_btn setTitle: _NS("Apply")];
+ [_stream_cancel_btn setTitle: _NS("Cancel")];
[_stream_destination_lbl setStringValue:_NS("Stream Destination")];
[_stream_announcement_lbl setStringValue:_NS("Stream Announcement")];
[_stream_type_lbl setStringValue:_NS("Type")];
[_ok_btn setEnabled: NO];
+ // setup drop view
+ [_drop_box enablePlaylistItems];
+ [_drop_box setDropHandler: self];
+
[self resetCustomizationSheetBasedOnProfile:[self.profileValueList objectAtIndex:0]];
}
- (IBAction)closeStreamPanel:(id)sender
{
+ [_stream_panel orderOut:sender];
+ [NSApp endSheet: _stream_panel];
+
+ if (sender == _stream_cancel_btn)
+ return;
+
/* provide a summary of the user selections */
NSMutableString * labelContent = [[NSMutableString alloc] initWithFormat:_NS("%@ stream to %@:%@"), [_stream_type_pop titleOfSelectedItem], [_stream_address_fld stringValue], [_stream_port_fld stringValue]];
/* store destination for further reference and update UI */
[self setOutputDestination: [_stream_address_fld stringValue]];
[self updateOKButton];
-
- [_stream_panel orderOut:sender];
- [NSApp endSheet: _stream_panel];
}
- (IBAction)streamTypeToggle:(id)sender
if (p_item) {
if (p_item->p_input) {
if (p_item->p_input->psz_uri != nil) {
- [self setMRL: [NSString stringWithFormat:@"%s", p_item->p_input->psz_uri]];
+ [self setMRL: toNSStr(p_item->p_input->psz_uri)];
[self updateDropView];
[self updateOKButton];
- (NSString *)currentEncapsulationFormatAsFileExtension:(BOOL)b_extension
{
- NSUInteger cellTag = [[_customize_encap_matrix selectedCell] tag];
+ NSUInteger cellTag = (NSUInteger) [[_customize_encap_matrix selectedCell] tag];
NSString * returnValue;
switch (cellTag) {
case MPEGTS:
}
@end
-
-# pragma mark -
-# pragma mark Drag and drop handling
-
-@implementation VLCDropEnabledBox
-
-- (void)awakeFromNib
-{
- [self registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]];
-}
-
-- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
-{
- b_activeDragAndDrop = YES;
- [self setNeedsDisplay:YES];
-
- [[NSCursor dragCopyCursor] set];
-
- if ((NSDragOperationGeneric & [sender draggingSourceOperationMask]) == NSDragOperationGeneric)
- return NSDragOperationGeneric;
-
- return NSDragOperationNone;
-}
-
-- (void)draggingEnded:(id < NSDraggingInfo >)sender
-{
- [[NSCursor arrowCursor] set];
- b_activeDragAndDrop = NO;
- [self setNeedsDisplay:YES];
-}
-
-- (void)draggingExited:(id < NSDraggingInfo >)sender
-{
- [[NSCursor arrowCursor] set];
- b_activeDragAndDrop = NO;
- [self setNeedsDisplay:YES];
-}
-
-- (void)drawRect:(NSRect)dirtyRect
-{
- if (b_activeDragAndDrop) {
- [[NSColor colorWithCalibratedRed:(.154/.255) green:(.154/.255) blue:(.154/.255) alpha:1.] setFill];
- NSRect frameRect = [[self contentView] bounds];
- frameRect.origin.x += 10;
- frameRect.origin.y += 10;
- frameRect.size.width -= 17;
- frameRect.size.height -= 17;
- NSFrameRectWithWidthUsingOperation(frameRect, 4., NSCompositeHighlight);
- }
-
- [super drawRect:dirtyRect];
-}
-
-- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
-{
- return YES;
-}
-
-- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
-{
- return [[VLCConvertAndSave sharedInstance] performDragOperation: sender];
-}
-
-- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
-{
- [self setNeedsDisplay:YES];
-}
-
-@end
-
-@implementation VLCDropEnabledImageView
-
-- (void)awakeFromNib
-{
- [self registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]];
-}
-
-- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
-{
- return [[[self superview] superview] draggingEntered:sender];
-}
-
-- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
-{
- return YES;
-}
-
-- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
-{
- return [[VLCConvertAndSave sharedInstance] performDragOperation: sender];
-}
-
-- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
-{
- [self setNeedsDisplay:YES];
-}
-
-@end
-
-@implementation VLCDropEnabledButton
-
-- (void)awakeFromNib
-{
- [self registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]];
-}
-
-- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
-{
- return [[[self superview] superview] draggingEntered:sender];
-}
-
-- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
-{
- return YES;
-}
-
-- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
-{
- return [[VLCConvertAndSave sharedInstance] performDragOperation: sender];
-}
-
-- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
-{
- [self setNeedsDisplay:YES];
-}
-
-@end