[vlc-commits] macosx: CAS: show drag-copy-cursor when receiving items from the playlist ( 10.6+ only)

Felix Paul Kühne git at videolan.org
Sun Jul 15 23:39:02 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Jul 15 21:21:52 2012 +0200| [35ccb9b18e7db407a21ad89028ce653cf6212545] | committer: Felix Paul Kühne

macosx: CAS: show drag-copy-cursor when receiving items from the playlist (10.6+ only)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35ccb9b18e7db407a21ad89028ce653cf6212545
---

 modules/gui/macosx/CompatibilityFixes.h |    5 +++++
 modules/gui/macosx/ConvertAndSave.m     |    5 +++++
 2 files changed, 10 insertions(+)

diff --git a/modules/gui/macosx/CompatibilityFixes.h b/modules/gui/macosx/CompatibilityFixes.h
index cf27f38..3ae77ba 100644
--- a/modules/gui/macosx/CompatibilityFixes.h
+++ b/modules/gui/macosx/CompatibilityFixes.h
@@ -79,6 +79,11 @@ extern OSErr UpdateSystemActivity(UInt8 activity);
 @interface NSURL (IntroducedInSnowLeopard)
 - (NSArray *)pathComponents;
 @end
+
+ at interface NSCursor (IntroducedInSnowLeopard)
++ (NSCursor *)dragCopyCursor;
+ at end
+
 #endif
 
 #pragma mark -
diff --git a/modules/gui/macosx/ConvertAndSave.m b/modules/gui/macosx/ConvertAndSave.m
index 1851936..9dde44f 100644
--- a/modules/gui/macosx/ConvertAndSave.m
+++ b/modules/gui/macosx/ConvertAndSave.m
@@ -605,6 +605,9 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
     b_activeDragAndDrop = YES;
     [self setNeedsDisplay:YES];
 
+    if (OSX_SNOW_LEOPARD || OSX_LION)
+        [[NSCursor dragCopyCursor] set];
+
     if ((NSDragOperationGeneric & [sender draggingSourceOperationMask]) == NSDragOperationGeneric)
         return NSDragOperationGeneric;
 
@@ -613,12 +616,14 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 
 - (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];
 }



More information about the vlc-commits mailing list