X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fplaylist.m;h=9be1f6b2a2be4902d9664f7c5b86a04a5c03dac8;hb=adec5472ece528e16c993ab60a7aeac34e2bb967;hp=7450e9b712cd3c789af65272457f07f951fa0d5a;hpb=d716c3db4433414d4d83c99d8bb4e6d85b14f348;p=vlc diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 7450e9b712..9be1f6b2a2 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -148,7 +148,7 @@ int i_return = 0; playlist_item_t *p_item = NULL; playlist_t * p_playlist = pl_Yield( VLCIntf ); - NSAssert( outlineView != o_outline_view ) + assert( outlineView == o_outline_view ); if( !item ) p_item = p_playlist->p_root_category; @@ -292,13 +292,12 @@ } else { - o_value = @"-:--:--"; + o_value = @"--:--"; } } free( psz_artist ); } - - return( o_value ); + return o_value; } @end @@ -383,12 +382,11 @@ for( i = 0; ppsz_services[i]; i++ ) { bool b_enabled; - char *objectname; NSMenuItem *o_lmi; char * name = ppsz_name[i] ? ppsz_name[i] : ppsz_services[i]; /* Check whether to enable these menuitems */ - b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, objectname ); + b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, ppsz_services[i] ); /* Create the menu entries used in the playlist menu */ o_lmi = [[o_mi_services submenu] addItemWithTitle: @@ -468,7 +466,7 @@ if( playlist_CurrentSize( p_playlist ) >= 2 ) { [o_status_field setStringValue: [NSString stringWithFormat: - _NS("%i items in the playlist"), + _NS("%i items"), playlist_CurrentSize( p_playlist )]]; } else @@ -476,7 +474,7 @@ if( playlist_IsEmpty( p_playlist ) ) [o_status_field setStringValue: _NS("No items in the playlist")]; else - [o_status_field setStringValue: _NS("1 item in the playlist")]; + [o_status_field setStringValue: _NS("1 item")]; } vlc_object_release( p_playlist ); } @@ -722,7 +720,7 @@ p_item = NULL; } } - playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, p_node, p_item ); + playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, false, p_node, p_item ); } vlc_object_release( p_playlist ); } @@ -997,12 +995,6 @@ p_item = playlist_ItemGetByInput( p_playlist, p_input, true ); playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL, p_item ); } - else - { - playlist_item_t *p_item; - p_item = playlist_ItemGetByInput( p_playlist, p_input, true ); - playlist_Control( p_playlist, PLAYLIST_SKIP, true, p_item ); - } vlc_gc_decref( p_input ); } [self playlistUpdated]; @@ -1041,12 +1033,6 @@ p_item = playlist_ItemGetByInput( p_playlist, p_input, true ); playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, true, NULL, p_item ); } - else - { - playlist_item_t *p_item; - p_item = playlist_ItemGetByInput( p_playlist, p_input, true ); - playlist_Control( p_playlist, PLAYLIST_SKIP, true, p_item ); - } vlc_gc_decref( p_input ); } [self playlistUpdated]; @@ -1251,9 +1237,9 @@ i_type = ORDER_NORMAL; } - vlc_mutex_lock( &p_playlist->object_lock ); + vlc_object_lock( p_playlist ); playlist_RecursiveNodeSort( p_playlist, p_playlist->p_root_category, i_mode, i_type ); - vlc_mutex_unlock( &p_playlist->object_lock ); + vlc_object_unlock( p_playlist ); vlc_object_release( p_playlist ); [self playlistUpdated]; @@ -1290,11 +1276,11 @@ [item pointerValue] checkItemExistence: YES] || [o_playing_item isEqual: item] ) { - [cell setFont: [NSFont boldSystemFontOfSize: 0]]; + [cell setFont: [[NSFontManager sharedFontManager] convertFont:[cell font] toHaveTrait:NSBoldFontMask]]; } else { - [cell setFont: [NSFont systemFontOfSize: 0]]; + [cell setFont: [[NSFontManager sharedFontManager] convertFont:[cell font] toNotHaveTrait:NSBoldFontMask]]; } vlc_object_release( p_playlist ); } @@ -1352,7 +1338,7 @@ if( playlist_CurrentSize( p_playlist ) >= 2 ) { [o_status_field setStringValue: [NSString stringWithFormat: - _NS("%i items in the playlist"), + _NS("%i items"), playlist_CurrentSize( p_playlist )]]; } else @@ -1363,16 +1349,13 @@ } else { - [o_status_field setStringValue: _NS("1 item in the playlist")]; + [o_status_field setStringValue: _NS("1 item")]; } } vlc_object_release( p_playlist ); [o_outline_dict setObject:o_value forKey:[NSString stringWithFormat:@"%p", [o_value pointerValue]]]; -#ifndef NDEBUG - msg_Dbg( VLCIntf, "adding item %p", [o_value pointerValue] ); -#endif return o_value; }