Changeset 3fc95408700235bb3bfd6fbb6e328fae850388c8

Show
Ignore:
Timestamp:
02/27/08 15:24:51 (6 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1204122291 +0000
git-parent:

[818a663ea9987aad38d748b7010c9f0d0de863b5]

git-author:
Rafaël Carré <funman@videolan.org> 1204122291 +0000
Message:

macosx gui playlist: allow drag & drop to the media library

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/macosx/playlist.m

    r006625e r3fc9540  
    166166    } 
    167167    if( p_item ) 
    168             i_return = p_item->i_children; 
    169     vlc_object_release( p_playlist ); 
    170  
    171     if( i_return <= 0 ) 
    172         i_return = 0; 
    173  
    174     return i_return; 
     168        i_return = p_item->i_children; 
     169    vlc_object_release( p_playlist ); 
     170 
     171    return i_return > 0 ? i_return : 0; 
    175172} 
    176173 
     
    14061403           (Service Discovery) */ 
    14071404        if( ![self isItem: [o_item pointerValue] inNode: 
    1408                         p_playlist->p_local_category checkItemExistence: NO]) 
     1405                        p_playlist->p_local_category checkItemExistence: NO] && 
     1406            ( var_CreateGetBool( p_playlist, "media-library" ) && 
     1407            ![self isItem: [o_item pointerValue] inNode: 
     1408                        p_playlist->p_ml_category checkItemExistence: NO]) ) 
    14091409        { 
    14101410            vlc_object_release(p_playlist); 
     
    14621462       Node. We still accept items that would be root nodes of the outlineview 
    14631463       however, to allow drop in an empty playlist. */ 
    1464     if( !([self isItem: [item pointerValue] inNode: p_playlist->p_local_category 
    1465                                     checkItemExistence: NO] || item == nil) ) 
     1464    if( !( ([self isItem: [item pointerValue] inNode: p_playlist->p_local_category checkItemExistence: NO] ||  
     1465        ( var_CreateGetBool( p_playlist, "media-library" ) && [self isItem: [item pointerValue] inNode: p_playlist->p_ml_category checkItemExistence: NO] ) ) || item == nil ) ) 
    14661466    { 
    14671467        vlc_object_release( p_playlist );