| 2373 | // make trash invisible |
| 2374 | StatStruct sbuf; |
| 2375 | trashDir->GetStat(&sbuf); |
| 2376 | |
| 2377 | PoseInfo poseInfo; |
| 2378 | poseInfo.fInvisible = true; |
| 2379 | poseInfo.fInitedDirectory = sbuf.st_ino; |
| 2380 | trashDir->WriteAttr(kAttrPoseInfo, B_RAW_TYPE, 0, &poseInfo, |
| 2381 | sizeof(PoseInfo)); |
| 2382 | |
| 2383 | size_t size; |
| 2384 | const void* data = GetTrackerResources()-> |
| 2385 | LoadResource('ICON', R_TrashIcon, &size); |
| 2386 | if (data != NULL) { |
| 2387 | trashDir->WriteAttr(kAttrLargeIcon, 'ICON', 0, |
| 2388 | data, size); |
| 2389 | } |
| 2390 | data = GetTrackerResources()-> |
| 2391 | LoadResource('MICN', R_TrashIcon, &size); |
| 2392 | if (data != NULL) { |
| 2393 | trashDir->WriteAttr(kAttrMiniIcon, 'MICN', 0, |
| 2394 | data, size); |
| 2395 | } |
| 2396 | #ifdef __HAIKU__ |
| 2397 | data = GetTrackerResources()-> |
| 2398 | LoadResource(B_VECTOR_ICON_TYPE, R_TrashIcon, &size); |
| 2399 | if (data != NULL) { |
| 2400 | trashDir->WriteAttr(kAttrIcon, B_VECTOR_ICON_TYPE, 0, |
| 2401 | data, size); |
| 2402 | } |
| 2403 | #endif |
| 2404 | |
2858 | | if (FSGetTrashDir(&trashDir, volume.Device()) == B_OK) { |
2859 | | // make trash invisible |
2860 | | StatStruct sbuf; |
2861 | | trashDir.GetStat(&sbuf); |
2862 | | |
2863 | | PoseInfo poseInfo; |
2864 | | poseInfo.fInvisible = true; |
2865 | | poseInfo.fInitedDirectory = sbuf.st_ino; |
2866 | | trashDir.WriteAttr(kAttrPoseInfo, B_RAW_TYPE, 0, &poseInfo, |
2867 | | sizeof(PoseInfo)); |
2868 | | |
2869 | | size_t size; |
2870 | | const void* data = GetTrackerResources()-> |
2871 | | LoadResource('ICON', R_TrashIcon, &size); |
2872 | | if (data != NULL) { |
2873 | | trashDir.WriteAttr(kAttrLargeIcon, 'ICON', 0, |
2874 | | data, size); |
2875 | | } |
2876 | | data = GetTrackerResources()-> |
2877 | | LoadResource('MICN', R_TrashIcon, &size); |
2878 | | if (data != NULL) { |
2879 | | trashDir.WriteAttr(kAttrMiniIcon, 'MICN', 0, |
2880 | | data, size); |
2881 | | } |
2882 | | #ifdef __HAIKU |
2883 | | data = GetTrackerResources()-> |
2884 | | LoadResource(B_VECTOR_ICON_TYPE, R_TrashIcon, &size); |
2885 | | if (data != NULL) { |
2886 | | trashDir.WriteAttr(kAttrIcon, B_VECTOR_ICON_TYPE, 0, |
2887 | | data, size); |
2888 | | } |
2889 | | #endif |
2890 | | } |
| 2889 | FSGetTrashDir(&trashDir, volume.Device()); |