/** * itdb_track_remove: * @track: an #Itdb_Track * * Removes @track from the #Itdb_iTunesDB it's associated with, and frees the * memory it uses. It doesn't remove the track from the playlists it may have * been added to, in particular it won't be removed from the master playlist. */ void itdb_track_remove (Itdb_Track *track) { Itdb_iTunesDB *itdb; g_return_if_fail (track); itdb = track->itdb; g_return_if_fail (itdb); itdb->tracks = g_list_remove (itdb->tracks, track); itdb_track_free (track); }
static void rb_ipod_free_delayed_action (RbIpodDelayedAction *action) { switch (action->type) { case RB_IPOD_ACTION_SET_NAME: g_free (action->name); break; case RB_IPOD_ACTION_SET_THUMBNAIL: g_object_unref (action->thumbnail_data.pixbuf); break; case RB_IPOD_ACTION_ADD_TRACK: if (action->track != NULL) { g_warning ("non NULL Itdb_Track, shouldn't happen"); itdb_track_free (action->track); } break; case RB_IPOD_ACTION_ADD_PLAYLIST: /* Do nothing */ break; case RB_IPOD_ACTION_REMOVE_PLAYLIST: /* Do nothing */ break; case RB_IPOD_ACTION_RENAME_PLAYLIST: g_free (action->name); break; case RB_IPOD_ACTION_REMOVE_TRACK: /* Do nothing */ break; case RB_IPOD_ACTION_ADD_TO_PLAYLIST: /* Do nothing */ break; case RB_IPOD_ACTION_REMOVE_FROM_PLAYLIST: /* Do nothing */ break; } g_free (action); }