diff --git a/src/kits/tracker/OverrideAlert.cpp b/src/kits/tracker/OverrideAlert.cpp index 6c74d45abe..d044273dc0 100644 --- a/src/kits/tracker/OverrideAlert.cpp +++ b/src/kits/tracker/OverrideAlert.cpp @@ -46,8 +46,9 @@ OverrideAlert::OverrideAlert(const char* title, const char* text, const char* button2, uint32 modifiers2, const char* button3, uint32 modifiers3, button_width width, alert_type type) - : BAlert(title, text, button1, button2, button3, width, type), - fCurModifiers(0) + : + BAlert(title, text, button1, button2, button3, width, type), + fCurModifiers(0) { fButtonModifiers[0] = modifiers1; fButtonModifiers[1] = modifiers2; @@ -64,8 +65,9 @@ OverrideAlert::OverrideAlert(const char* title, const char* text, const char* button2, uint32 modifiers2, const char* button3, uint32 modifiers3, button_width width, button_spacing spacing, alert_type type) - : BAlert(title, text, button1, button2, button3, width, spacing, type), - fCurModifiers(0) + : + BAlert(title, text, button1, button2, button3, width, spacing, type), + fCurModifiers(0) { fButtonModifiers[0] = modifiers1; fButtonModifiers[1] = modifiers2; @@ -108,7 +110,7 @@ OverrideAlert::OverPosition(float width, float height) BRect desirableRect; screenFrame = BScreen(window).Frame(); - if (window) { + if (window != NULL) { // If we found a window associated with this calling thread, // place alert over that window so that the first button is // on top of it. This allows name editing confirmations to @@ -123,7 +125,6 @@ OverrideAlert::OverPosition(float width, float height) desirableRect.right = desirableRect.left+width; desirableRect.top = midY - ceilf(height / 3.0f); desirableRect.bottom = desirableRect.top + height; - } else { // Otherwise, just place alert in center of screen. @@ -150,7 +151,7 @@ OverrideAlert::UpdateButtons(uint32 modifiers, bool force) fCurModifiers = modifiers; for (int32 i = 0; i < 3; i++) { BButton* button = ButtonAt(i); - if (button) { + if (button != NULL) { button->SetEnabled(((fButtonModifiers[i] & fCurModifiers) == fButtonModifiers[i])); } diff --git a/src/kits/tracker/OverrideAlert.h b/src/kits/tracker/OverrideAlert.h index 6c2ae5d7e5..47c340da8f 100644 --- a/src/kits/tracker/OverrideAlert.h +++ b/src/kits/tracker/OverrideAlert.h @@ -31,8 +31,6 @@ of Be Incorporated in the United States and other countries. Other brand product names are registered trademarks or trademarks of their respective holders. All rights reserved. */ -#ifndef _OVERRIDE_ALERT_H -#define _OVERRIDE_ALERT_H // This is a special BAlert for which you can specify modifier // keys that must be down for various buttons to be enabled. It @@ -43,6 +41,8 @@ All rights reserved. // normal BAlert, attempting to be on top of the calling window. // This allows it to work when confirming rename operations with // Focus Follows Mouse turned on. +#ifndef _OVERRIDE_ALERT_H +#define _OVERRIDE_ALERT_H #include @@ -81,4 +81,5 @@ private: using namespace BPrivate; + #endif // _OVERRIDE_ALERT_H