]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlist.m
macosx: video effects panel: synchronize text field and stepper values properly by...
[vlc] / modules / gui / macosx / playlist.m
index 1fd89d0560547a8ce4a23ad72cdbde3bda717f77..4995d95f04bc578e1005c66fa7d0b1c4e92c23be 100644 (file)
 /*****************************************************************************
  * VLCPlaylist implementation
  *****************************************************************************/
+@interface VLCPlaylist (Internal)
+- (void)saveTableColumns;
+@end
+
 @implementation VLCPlaylist
 
 + (void)initialize{
         if (! p_item || !p_item->p_input)
             continue;
 
-        o_mrl = [[NSMutableString alloc] initWithFormat: @"%s", decode_URI(input_item_GetURI(p_item->p_input))];
+        char * psz_url = decode_URI(input_item_GetURI(p_item->p_input));
+        o_mrl = [[NSMutableString alloc] initWithString: [NSString stringWithUTF8String: psz_url ? psz_url : ""]];
+        if (psz_url != NULL)
+            free( psz_url );
 
         /* perform some checks whether it is a file and if it is local at all... */
         if ([o_mrl length] > 0) {
     }
     else
         [o_outline_view removeTableColumn: [o_outline_view tableColumnWithIdentifier: o_column]];
+
+    [o_outline_view setOutlineTableColumn: [o_outline_view tableColumnWithIdentifier:TITLE_COLUMN]];
 }
 
 - (void)saveTableColumns
 
     /* Drag & Drop inside the playlist */
     if ([[o_pasteboard types] containsObject: @"VLCPlaylistItemPboardType"]) {
+        if (index == -1) // this is no valid target, sanitize to top of table
+            index = 0;
+
         int i_row = 0;
         playlist_item_t *p_new_parent, *p_item = NULL;
         NSArray *o_all_items = [o_nodes_array arrayByAddingObjectsFromArray: o_items_array];