]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/ConvertAndSave.m
macosx: slightly de-uglify the VLC description in the about dialog by rendering it...
[vlc] / modules / gui / macosx / ConvertAndSave.m
index 1e514f8e5a0dbab8c5f0ecb7eff2862bce30719a..631af73ecc52cb6da6a72885d03343db3eab00c8 100644 (file)
@@ -176,7 +176,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
     [_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")];
@@ -261,6 +261,10 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 
     [_ok_btn setEnabled: NO];
 
+    // setup drop view
+    [_drop_box enablePlaylistItems];
+    [_drop_box setDropHandler: self];
+
     [self resetCustomizationSheetBasedOnProfile:[self.profileValueList objectAtIndex:0]];
 }
 
@@ -822,7 +826,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 
 - (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:
@@ -1057,130 +1061,3 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 }
 
 @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