Model: Add accessor for Trash node property and cleanup spacing between inlines.

Rest: Use the IsTrash() accessor on Model where possible in place of the more expensive FSIsTrashDir() check.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35132 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2010-01-17 19:58:46 +00:00
parent 9589965cbd
commit d9626569fb
7 changed files with 49 additions and 23 deletions
+2 -3
View File
@@ -1207,10 +1207,9 @@ AttributeView::ReLinkTargetModel(Model *model)
void
AttributeView::MouseDown(BPoint point)
{
// Make sure this isn't the trash directory
BEntry entry;
fModel->GetEntry(&entry);
// Assume this isn't part of a double click
fDoubleClick = false;
@@ -1223,7 +1222,7 @@ AttributeView::MouseDown(BPoint point)
fTrackingState = path_track;
} else if (fTitleRect.Contains(point)) {
// You can't change the name of the trash
if (!FSIsTrashDir(&entry)
if (!fModel->IsTrash()
&& ConfirmChangeIfWellKnownDirectory(&entry, "rename", true)
&& fTitleEditView == 0)
BeginEditingTitle();