* PoseView: Re-enabled respecting the invisible pose attribute.
* FSUtils: Mark the root-level Trash directories as invisible. For the time being, this renders the Trash only visible on the Desktop once more, pending further consensus on how to handle it in the future. Note however that this also means that Desktop and/or var directories that still have the old _trk/pinfo_le attribute from prior to the previous visibility changes will also be marked invisible again, and those people dual-booting older BeOS will also still see this issue as the Tracker on those will still force-write the invisible attribute onto those directories on every volume. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35094 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a65ec15376
commit
7ca5e8873b
@ -2251,7 +2251,7 @@ CalcItemsAndSize(BObjectList<entry_ref> *refList, size_t blockSize,
|
||||
|
||||
|
||||
status_t
|
||||
FSGetTrashDir(BDirectory *trash_dir, dev_t dev)
|
||||
FSGetTrashDir(BDirectory *trashDir, dev_t dev)
|
||||
{
|
||||
|
||||
BVolume volume(dev);
|
||||
@ -2264,29 +2264,10 @@ FSGetTrashDir(BDirectory *trash_dir, dev_t dev)
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
|
||||
result = trash_dir->SetTo(path.Path());
|
||||
result = trashDir->SetTo(path.Path());
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
|
||||
// make trash invisible
|
||||
attr_info a_info;
|
||||
if (trash_dir->GetAttrInfo(kAttrPoseInfo, &a_info) != B_OK) {
|
||||
|
||||
StatStruct sbuf;
|
||||
trash_dir->GetStat(&sbuf);
|
||||
|
||||
// move trash to bottom left of main screen initially
|
||||
BScreen screen(B_MAIN_SCREEN_ID);
|
||||
BRect scrn_frame = screen.Frame();
|
||||
|
||||
PoseInfo poseInfo;
|
||||
poseInfo.fInvisible = false;
|
||||
poseInfo.fInitedDirectory = sbuf.st_ino;
|
||||
poseInfo.fLocation = BPoint(scrn_frame.left + 20, scrn_frame.bottom - 60);
|
||||
trash_dir->WriteAttr(kAttrPoseInfo, B_RAW_TYPE, 0, &poseInfo,
|
||||
sizeof(PoseInfo));
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@ -2767,6 +2748,16 @@ FSCreateTrashDirs()
|
||||
|
||||
BDirectory trashDir;
|
||||
if (FSGetTrashDir(&trashDir, volume.Device()) == B_OK) {
|
||||
// make trash invisible
|
||||
StatStruct sbuf;
|
||||
trashDir.GetStat(&sbuf);
|
||||
|
||||
PoseInfo poseInfo;
|
||||
poseInfo.fInvisible = true;
|
||||
poseInfo.fInitedDirectory = sbuf.st_ino;
|
||||
trashDir.WriteAttr(kAttrPoseInfo, B_RAW_TYPE, 0, &poseInfo,
|
||||
sizeof(PoseInfo));
|
||||
|
||||
size_t size;
|
||||
const void* data = GetTrackerResources()->
|
||||
LoadResource('ICON', kResTrashIcon, &size);
|
||||
|
@ -1825,6 +1825,9 @@ BPoseView::PoseVisible(const Model *model, const PoseInfo *poseInfo,
|
||||
bool
|
||||
BPoseView::ShouldShowPose(const Model *model, const PoseInfo *poseInfo)
|
||||
{
|
||||
if (!PoseVisible(model, poseInfo, IsFilePanel()))
|
||||
return false;
|
||||
|
||||
// check filter before adding item
|
||||
if (!fRefFilter)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user