| 669 | } |
| 670 | |
| 671 | void FileSystemPile::onFileAdded(QString strFileName) |
| 672 | { |
| 673 | |
| 674 | FileSystemActor *fsData; |
| 675 | |
| 676 | // Look for collisions |
| 677 | for (uint i = 0; i < pileItems.size(); i++) |
| 678 | { |
| 679 | fsData = (FileSystemActor *) pileItems[i]; |
| 680 | |
| 681 | if (fsManager->isIdenticalPath(fsData->getFullPath(), strFileName)) |
| 682 | { |
| 683 | // This item is already in the pile |
| 684 | return; |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | // Disallow hidden files when not specified |
| 689 | if (fsManager->getFileAttributes(strFileName) & Hidden && |
| 690 | GLOBAL(settings).LoadHiddenFiles == false) return; |
| 691 | |
| 692 | // Create the new Actor |
| 693 | FileSystemActor *actor = FileSystemActorFactory::createFileSystemActor(strFileName); |
| 694 | actor->setDimsToDefault(); |
| 695 | actor->setGlobalOrientation(GLOBAL(straightIconOri)); |
| 696 | actor->setGlobalPosition(getGlobalPosition()); |
| 697 | actor->setAlpha(1.0f); |
| 698 | actor->setFilePath(strFileName); |
| 699 | |
| 700 | // Add it to this pile |
| 701 | Pile::addToPile(actor); |
| 702 | |
| 703 | // Relayout |
| 704 | updatePileState(); |
| 705 | } |
| 706 | |
| 707 | void FileSystemPile::onFileRemoved(QString strFileName) |
| 708 | { |
nothing calls this directly
no test coverage detected