diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index 9eb51e92eb..1baa4267d6 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -3132,22 +3132,26 @@ BContainerWindow::MarkAttributeMenu(BMenu *menu) for (int32 index = 0; index < count; index++) { BMenuItem *item = menu->ItemAt(index); int32 attrHash; - if (item->Message()) + if (item->Message()) { if (item->Message()->FindInt32("attr_hash", &attrHash) == B_OK) item->SetMarked(PoseView()->ColumnFor((uint32)attrHash) != 0); else item->SetMarked(false); + } BMenu *submenu = item->Submenu(); if (submenu) { int32 count2 = submenu->CountItems(); for (int32 subindex = 0; subindex < count2; subindex++) { item = submenu->ItemAt(subindex); - if (item->Message()) - if (item->Message()->FindInt32("attr_hash", &attrHash) == B_OK) - item->SetMarked(PoseView()->ColumnFor((uint32)attrHash) != 0); - else + if (item->Message()) { + if (item->Message()->FindInt32("attr_hash", &attrHash) + == B_OK) { + item->SetMarked(PoseView()->ColumnFor((uint32)attrHash) + != 0); + } else item->SetMarked(false); + } } } } diff --git a/src/kits/tracker/FSClipboard.cpp b/src/kits/tracker/FSClipboard.cpp index fde918a0b6..5c25dde773 100644 --- a/src/kits/tracker/FSClipboard.cpp +++ b/src/kits/tracker/FSClipboard.cpp @@ -236,17 +236,19 @@ FSClipboardAddPoses(const node_ref *directory, PoseList *list, uint32 moveMode, MakeModeNameFromRefName(modeName, refName); if (clearClipboard) { - if (clip->AddInt32(modeName, (int32)moveMode) == B_OK) + if (clip->AddInt32(modeName, (int32)moveMode) == B_OK) { if (clip->AddRef(refName, model->EntryRef()) == B_OK) { pose->SetClipboardMode(moveMode); clipNode.node = *node; - updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, &clipNode, - sizeof(TClipboardNodeRef), true, listCount); + updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, + &clipNode, sizeof(TClipboardNodeRef), true, + listCount); refsAdded++; } else clip->RemoveName(modeName); + } } else { if (clip->ReplaceInt32(modeName, (int32)moveMode) == B_OK) { // replace old mode if entry already exists in clipboard @@ -254,8 +256,9 @@ FSClipboardAddPoses(const node_ref *directory, PoseList *list, uint32 moveMode, pose->SetClipboardMode(moveMode); clipNode.node = *node; - updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, &clipNode, - sizeof(TClipboardNodeRef), true, listCount); + updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, + &clipNode, sizeof(TClipboardNodeRef), true, + listCount); refsAdded++; } else { @@ -263,9 +266,11 @@ FSClipboardAddPoses(const node_ref *directory, PoseList *list, uint32 moveMode, clipNode.node = *node; clipNode.moveMode = kDelete; // note removing node - updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, &clipNode, - sizeof(TClipboardNodeRef), true, listCount); - clipNode.moveMode = moveMode; // set it back to current value + updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, + &clipNode, sizeof(TClipboardNodeRef), true, + listCount); + clipNode.moveMode = moveMode; + // set it back to current value } } else { // add it if it doesn't exist @@ -274,8 +279,9 @@ FSClipboardAddPoses(const node_ref *directory, PoseList *list, uint32 moveMode, pose->SetClipboardMode(moveMode); clipNode.node = *node; - updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, &clipNode, - sizeof(TClipboardNodeRef), true, listCount); + updateMessage.AddData("tcnode", T_CLIPBOARD_NODE, + &clipNode, sizeof(TClipboardNodeRef), true, + listCount); refsAdded++; } else { diff --git a/src/kits/tracker/FindPanel.cpp b/src/kits/tracker/FindPanel.cpp index 696f0313b6..ebf5e9a158 100644 --- a/src/kits/tracker/FindPanel.cpp +++ b/src/kits/tracker/FindPanel.cpp @@ -2467,11 +2467,13 @@ TAttrView::RestoreState(const BMessage &message, int32 index) int32 logicMenuSelectedIndex; BMenuField *field = dynamic_cast(FindView("Logic")); - if (message.FindInt32("logicalRelation", index, &logicMenuSelectedIndex) == B_OK) + if (message.FindInt32("logicalRelation", index, + &logicMenuSelectedIndex) == B_OK) { if (field) field->Menu()->ItemAt(logicMenuSelectedIndex)->SetMarked(true); else AddLogicMenu(logicMenuSelectedIndex == 0); + } } diff --git a/src/kits/tracker/IconCache.cpp b/src/kits/tracker/IconCache.cpp index e0a1af1040..e0891a9345 100644 --- a/src/kits/tracker/IconCache.cpp +++ b/src/kits/tracker/IconCache.cpp @@ -1681,7 +1681,8 @@ NodeCacheEntry::Hash() const uint32 NodeCacheEntry::Hash(const node_ref *node) { - return node->device ^ ((uint32 *)&node->node)[0] ^ ((uint32 *)&node->node)[1]; + return node->device ^ ((uint32 *)&node->node)[0] + ^ ((uint32 *)&node->node)[1]; } diff --git a/src/kits/tracker/InfoWindow.cpp b/src/kits/tracker/InfoWindow.cpp index d9300168eb..39e1b372c3 100644 --- a/src/kits/tracker/InfoWindow.cpp +++ b/src/kits/tracker/InfoWindow.cpp @@ -1108,14 +1108,15 @@ AttributeView::ModelChanged(Model *model, BMessage *message) // device, while the model is set to the device of the volume // directly - this hack works for volumes that are mounted in // the root directory - || model->IsVolume() + || (model->IsVolume() && itemNode.device == 1 - && itemNode.node == model->NodeRef()->node) { + && itemNode.node == model->NodeRef()->node)) { model->UpdateEntryRef(&dirNode, name); BString title; title << name << " info"; Window()->SetTitle(title.String()); - WidgetAttributeText::AttrAsString(model, &fPathStr, kAttrPath, B_STRING_TYPE, 0, this); + WidgetAttributeText::AttrAsString(model, &fPathStr, kAttrPath, + B_STRING_TYPE, 0, this); } break; } @@ -1123,9 +1124,11 @@ AttributeView::ModelChanged(Model *model, BMessage *message) case B_STAT_CHANGED: if (model->OpenNode() == B_OK) { WidgetAttributeText::AttrAsString(model, &fCreatedStr, - kAttrStatCreated, B_TIME_TYPE, drawBounds.Width() - kBorderMargin, this); + kAttrStatCreated, B_TIME_TYPE, drawBounds.Width() + - kBorderMargin, this); WidgetAttributeText::AttrAsString(model, &fModifiedStr, - kAttrStatModified, B_TIME_TYPE, drawBounds.Width() - kBorderMargin, this); + kAttrStatModified, B_TIME_TYPE, drawBounds.Width() + - kBorderMargin, this); // don't change the size if it's a directory if (!model->IsDirectory()) { @@ -1144,7 +1147,8 @@ AttributeView::ModelChanged(Model *model, BMessage *message) if (message->FindString("attr", &attrName) == B_OK) { if (strcmp(attrName, kAttrLargeIcon) == 0 || strcmp(attrName, kAttrIcon) == 0) { - Invalidate(BRect(10, 10, 10 + B_LARGE_ICON, 10 + B_LARGE_ICON)); + Invalidate(BRect(10, 10, 10 + B_LARGE_ICON, 10 + + B_LARGE_ICON)); } else if (strcmp(attrName, kAttrMIMEType) == 0) {