Author: axeld Date: 2010-02-21 18:22:34 +0100 (Sun, 21 Feb 2010) New Revision: 35557 Changeset: http://dev.haiku-os.org/changeset/35557/haiku Modified: haiku/trunk/src/kits/tracker/PoseView.cpp Log: * Fixed warnings and coding style violations. Modified: haiku/trunk/src/kits/tracker/PoseView.cpp =================================================================== --- haiku/trunk/src/kits/tracker/PoseView.cpp 2010-02-21 17:16:59 UTC (rev 35556) +++ haiku/trunk/src/kits/tracker/PoseView.cpp 2010-02-21 17:22:34 UTC (rev 35557) @@ -1354,8 +1354,8 @@ if (!view->ShouldShowPose(model, &(posesResult->fPoseInfos[modelChunkIndex])) // filter out models we do not want to show - || model->IsSymLink() - && !view->CreateSymlinkPoseTarget(model)) { + || (model->IsSymLink() + && !view->CreateSymlinkPoseTarget(model))) { // filter out symlinks whose target models we do not // want to show @@ -9026,7 +9026,7 @@ int32 index; BPose *targetPose = FindPose(mouseLoc, &index); - if (fCursorCheck && targetPose == fDropTarget + if ((fCursorCheck && targetPose == fDropTarget) || (trackingContextMenu && !targetPose)) // no change return false; @@ -9286,8 +9286,8 @@ return false; // make sure window is in front before attempting scrolling - BContainerWindow *window = ContainerWindow(); - if (!window) + BContainerWindow* window = ContainerWindow(); + if (window == NULL) return false; // selection scrolling will also work if the window is inactive @@ -9321,11 +9321,13 @@ if (keepGoing) { wouldScroll = true; - if (shouldScroll) - if (fVScrollBar) - fVScrollBar->SetValue(fVScrollBar->Value() - scrollIncrement); - else + if (shouldScroll) { + if (fVScrollBar != NULL) { + fVScrollBar->SetValue( + fVScrollBar->Value() - scrollIncrement); + } else ScrollBy(0, -scrollIncrement); + } } } @@ -9346,11 +9348,13 @@ if (keepGoing) { wouldScroll = true; - if (shouldScroll) - if (fVScrollBar) - fVScrollBar->SetValue(fVScrollBar->Value() + scrollIncrement); - else + if (shouldScroll) { + if (fVScrollBar != NULL) { + fVScrollBar->SetValue( + fVScrollBar->Value() + scrollIncrement); + } else ScrollBy(0, scrollIncrement); + } } } @@ -9371,11 +9375,13 @@ if (keepGoing) { wouldScroll = true; - if (shouldScroll) - if (fHScrollBar) - fHScrollBar->SetValue(fHScrollBar->Value() - scrollIncrement); - else + if (shouldScroll) { + if (fHScrollBar != NULL) { + fHScrollBar->SetValue( + fHScrollBar->Value() - scrollIncrement); + } else ScrollBy(-scrollIncrement, 0); + } } } @@ -9396,11 +9402,13 @@ if (keepGoing) { wouldScroll = true; - if (shouldScroll) - if (fHScrollBar) - fHScrollBar->SetValue(fHScrollBar->Value() + scrollIncrement); - else + if (shouldScroll) { + if (fHScrollBar != NULL) { + fHScrollBar->SetValue( + fHScrollBar->Value() + scrollIncrement); + } else ScrollBy(scrollIncrement, 0); + } } }