]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlist.m
macosx: Yet an other locking typo.
[vlc] / modules / gui / macosx / playlist.m
index f043dad6f32b5fd69298c34868acf419c9ece500..22d81f856617b8e8296406045dc0a90ec3f95a75 100644 (file)
             }
             else
             {
-                o_value = @"-:--:--";
+                o_value = @"--:--";
             }
         }
         free( psz_artist );
     }
-
-    return( o_value );
+    return o_value;
 }
 
 @end
 
         char * name = ppsz_name[i] ? ppsz_name[i] : ppsz_services[i];
         /* Check whether to enable these menuitems */
-        b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, name );
+        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:
     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
         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 );
 }
                 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 );
 }
     int i_item;
     playlist_t * p_playlist = pl_Yield( VLCIntf );
 
+    PL_LOCK;
     for( i_item = 0; i_item < (int)[o_array count]; i_item++ )
     {
         input_item_t *p_input;
 
         /* Add the item */
         /* FIXME: playlist_AddInput() can fail */
+        
         playlist_AddInput( p_playlist, p_input, PLAYLIST_INSERT,
              i_position == -1 ? PLAYLIST_END : i_position + i_item, true,
-         false );
+         true );
 
         if( i_item == 0 && !b_enqueue )
         {
             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 );
     }
+    PL_UNLOCK;
+
     [self playlistUpdated];
     vlc_object_release( p_playlist );
 }
             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];
                         [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 );
 }
     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
         }
         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;
 
 }