* make sure that the opened media is always enqueueded, if macosx-autoplay is false
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 9 Dec 2006 19:57:48 +0000 (19:57 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 9 Dec 2006 19:57:48 +0000 (19:57 +0000)
modules/gui/macosx/intf.m
modules/gui/macosx/misc.m

index fae21c9..e3da93f 100644 (file)
@@ -666,9 +666,12 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (BOOL)application:(NSApplication *)o_app openFile:(NSString *)o_filename
 {
+    BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
     NSDictionary *o_dic = [NSDictionary dictionaryWithObjectsAndKeys: o_filename, @"ITEM_URL", nil];
-    [o_playlist appendArray:
-        [NSArray arrayWithObject: o_dic] atPos: -1 enqueue: NO];
+    if( b_autoplay )
+        [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue: NO];
+    else
+        [o_playlist appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue: YES];
 
     return( TRUE );
 }
index 89cb25e..ae0fc3e 100644 (file)
     NSArray *o_types = [NSArray arrayWithObjects: NSFilenamesPboardType, nil];
     NSString *o_desired_type = [o_paste availableTypeFromArray:o_types];
     NSData *o_carried_data = [o_paste dataForType:o_desired_type];
+    BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
 
     if( o_carried_data )
     {
                 o_dic = [NSDictionary dictionaryWithObject:[o_values objectAtIndex:i] forKey:@"ITEM_URL"];
                 o_array = [o_array arrayByAddingObject: o_dic];
             }
-            [[[VLCMain sharedInstance] getPlaylist] appendArray: o_array atPos: -1 enqueue:NO];
+            if( b_autoplay )
+                [[[VLCMain sharedInstance] getPlaylist] appendArray: o_array atPos: -1 enqueue:NO];
+            else
+                [[[VLCMain sharedInstance] getPlaylist] appendArray: o_array atPos: -1 enqueue:YES];
             return YES;
         }
     }