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

View File

@ -804,7 +804,7 @@ BContainerWindow::AddContextMenus()
AddDropContextMenus(fDropContextMenu);
fDragContextMenu = new BSlowContextMenu("DragContext");
// will get added and built dynamically in ShowContextMenu
// will get added and built dynamically in ShowContextMenu
fTrashContextMenu = new BPopUpMenu("TrashContext", false, false);
fTrashContextMenu->SetFont(be_plain_font);
@ -2499,14 +2499,14 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *)
BPoint global(loc);
PoseView()->ConvertToScreen(&global);
PoseView()->CommitActivePose();
BRect mouse_rect(global.x, global.y, global.x, global.y);
mouse_rect.InsetBy(-5, -5);
BRect mouseRect(global.x, global.y, global.x, global.y);
mouseRect.InsetBy(-5, -5);
EnableNamedMenuItem(fTrashContextMenu, kEmptyTrash,
static_cast<TTracker *>(be_app)->TrashFull());
SetupNavigationMenu(ref, fTrashContextMenu);
fTrashContextMenu->Go(global, true, false, mouse_rect, true);
fTrashContextMenu->Go(global, true, false, mouseRect, true);
} else {
bool showAsVolume = false;
@ -2549,9 +2549,9 @@ BContainerWindow::ShowContextMenu(BPoint loc, const entry_ref *ref, BView *)
fDragContextMenu->SetTarget(BMessenger(this));
BPoseView *poseView = PoseView();
if (poseView) {
BMessenger tmpTarget(poseView);
BMessenger target(poseView);
fDragContextMenu->InitTrackingHook(
&BPoseView::MenuTrackingHook, &tmpTarget, fDragMessage);
&BPoseView::MenuTrackingHook, &target, fDragMessage);
}
// this is now asynchronous so that we don't

View File

@ -178,6 +178,7 @@ DesktopPoseView::AddPosesCompleted()
AddTrashPose();
}
bool
DesktopPoseView::ShouldShowPose(const Model *model, const PoseInfo *poseInfo)
{

View File

@ -764,9 +764,9 @@ BPoseView::SavePoseLocations(BRect *frameIfDesktop)
if (model->IsRoot() || isTrash) {
BDirectory dir;
if (FSGetDeskDir(&dir) == B_OK) {
const char *poseInfoAttr = (isTrash) ? kAttrTrashPoseInfo
const char *poseInfoAttr = isTrash ? kAttrTrashPoseInfo
: kAttrDisksPoseInfo;
const char *poseInfoAttrForeign = (isTrash)
const char *poseInfoAttrForeign = isTrash
? kAttrTrashPoseInfoForeign
: kAttrDisksPoseInfoForeign;
if (dir.WriteAttr(poseInfoAttr, B_RAW_TYPE, 0,
@ -2652,9 +2652,9 @@ BPoseView::ReadPoseInfo(Model *model, PoseInfo *poseInfo)
if (model->IsRoot() || isTrash) {
BDirectory dir;
if (FSGetDeskDir(&dir) == B_OK) {
const char *poseInfoAttr = (isTrash) ? kAttrTrashPoseInfo
const char *poseInfoAttr = isTrash ? kAttrTrashPoseInfo
: kAttrDisksPoseInfo;
const char *poseInfoAttrForeign = (isTrash) ? kAttrTrashPoseInfoForeign
const char *poseInfoAttrForeign = isTrash ? kAttrTrashPoseInfoForeign
: kAttrDisksPoseInfoForeign;
result = ReadAttr(&dir, poseInfoAttr, poseInfoAttrForeign,
B_RAW_TYPE, 0, poseInfo, sizeof(*poseInfo), &PoseInfo::EndianSwap);

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?
if (device == bootDevice || !strcmp(fsInfo.fsh_name, "bfs"))
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_";
break;