Fix style violations (thanks Axel!).

Update filesystem name in find_directory as our fat filesystem is not named "dos".



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35093 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2010-01-15 23:31:45 +00:00
parent fbb82a6282
commit a65ec15376
4 changed files with 12 additions and 11 deletions
+5 -5
View File
@@ -2499,14 +2499,14 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *)
BPoint global(loc); BPoint global(loc);
PoseView()->ConvertToScreen(&global); PoseView()->ConvertToScreen(&global);
PoseView()->CommitActivePose(); PoseView()->CommitActivePose();
BRect mouse_rect(global.x, global.y, global.x, global.y); BRect mouseRect(global.x, global.y, global.x, global.y);
mouse_rect.InsetBy(-5, -5); mouseRect.InsetBy(-5, -5);
EnableNamedMenuItem(fTrashContextMenu, kEmptyTrash, EnableNamedMenuItem(fTrashContextMenu, kEmptyTrash,
static_cast<TTracker *>(be_app)->TrashFull()); static_cast<TTracker *>(be_app)->TrashFull());
SetupNavigationMenu(ref, fTrashContextMenu); SetupNavigationMenu(ref, fTrashContextMenu);
fTrashContextMenu->Go(global, true, false, mouse_rect, true); fTrashContextMenu->Go(global, true, false, mouseRect, true);
} else { } else {
bool showAsVolume = false; bool showAsVolume = false;
@@ -2549,9 +2549,9 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *)
fDragContextMenu->SetTarget(BMessenger(this)); fDragContextMenu->SetTarget(BMessenger(this));
BPoseView *poseView = PoseView(); BPoseView *poseView = PoseView();
if (poseView) { if (poseView) {
BMessenger tmpTarget(poseView); BMessenger target(poseView);
fDragContextMenu->InitTrackingHook( fDragContextMenu->InitTrackingHook(
&BPoseView::MenuTrackingHook, &tmpTarget, fDragMessage); &BPoseView::MenuTrackingHook, &target, fDragMessage);
} }
// this is now asynchronous so that we don't // this is now asynchronous so that we don't
+1
View File
@@ -178,6 +178,7 @@ DesktopPoseView::AddPosesCompleted()
AddTrashPose(); AddTrashPose();
} }
bool bool
DesktopPoseView::ShouldShowPose(const Model *model, const PoseInfo *poseInfo) DesktopPoseView::ShouldShowPose(const Model *model, const PoseInfo *poseInfo)
{ {
+4 -4
View File
@@ -764,9 +764,9 @@ BPoseView::SavePoseLocations(BRect *frameIfDesktop)
if (model->IsRoot() || isTrash) { if (model->IsRoot() || isTrash) {
BDirectory dir; BDirectory dir;
if (FSGetDeskDir(&dir) == B_OK) { if (FSGetDeskDir(&dir) == B_OK) {
const char *poseInfoAttr = (isTrash) ? kAttrTrashPoseInfo const char *poseInfoAttr = isTrash ? kAttrTrashPoseInfo
: kAttrDisksPoseInfo; : kAttrDisksPoseInfo;
const char *poseInfoAttrForeign = (isTrash) const char *poseInfoAttrForeign = isTrash
? kAttrTrashPoseInfoForeign ? kAttrTrashPoseInfoForeign
: kAttrDisksPoseInfoForeign; : kAttrDisksPoseInfoForeign;
if (dir.WriteAttr(poseInfoAttr, B_RAW_TYPE, 0, if (dir.WriteAttr(poseInfoAttr, B_RAW_TYPE, 0,
@@ -2652,9 +2652,9 @@ BPoseView::ReadPoseInfo(Model *model, PoseInfo *poseInfo)
if (model->IsRoot() || isTrash) { if (model->IsRoot() || isTrash) {
BDirectory dir; BDirectory dir;
if (FSGetDeskDir(&dir) == B_OK) { if (FSGetDeskDir(&dir) == B_OK) {
const char *poseInfoAttr = (isTrash) ? kAttrTrashPoseInfo const char *poseInfoAttr = isTrash ? kAttrTrashPoseInfo
: kAttrDisksPoseInfo; : kAttrDisksPoseInfo;
const char *poseInfoAttrForeign = (isTrash) ? kAttrTrashPoseInfoForeign const char *poseInfoAttrForeign = isTrash ? kAttrTrashPoseInfoForeign
: kAttrDisksPoseInfoForeign; : kAttrDisksPoseInfoForeign;
result = ReadAttr(&dir, poseInfoAttr, poseInfoAttrForeign, result = ReadAttr(&dir, poseInfoAttr, poseInfoAttrForeign,
B_RAW_TYPE, 0, poseInfo, sizeof(*poseInfo), &PoseInfo::EndianSwap); B_RAW_TYPE, 0, poseInfo, sizeof(*poseInfo), &PoseInfo::EndianSwap);
+1 -1
View File
@@ -202,7 +202,7 @@ find_directory(directory_which which, dev_t device, bool createIt,
// TODO: eventually put that into the file system API? // TODO: eventually put that into the file system API?
if (device == bootDevice || !strcmp(fsInfo.fsh_name, "bfs")) if (device == bootDevice || !strcmp(fsInfo.fsh_name, "bfs"))
template = "Trash"; // TODO: add suffix for current user template = "Trash"; // TODO: add suffix for current user
else if (!strcmp(fsInfo.fsh_name, "dos")) else if (!strcmp(fsInfo.fsh_name, "fat"))
template = "RECYCLED/_BEOS_"; template = "RECYCLED/_BEOS_";
break; break;