diff --git a/src/kits/interface/ScrollBar.cpp b/src/kits/interface/ScrollBar.cpp index 288f3c47ac..e5177ca479 100644 --- a/src/kits/interface/ScrollBar.cpp +++ b/src/kits/interface/ScrollBar.cpp @@ -68,7 +68,7 @@ BScrollBar::BScrollBar(BRect frame,const char *name,BView *target,float min, privatedata=new BScrollBarPrivateData; privatedata->thumbframe=Bounds(); - if(!fTarget) + if(fTarget) { fTargetName=new char[strlen(fTarget->Name()+1)]; strcpy(fTargetName,target->Name()); @@ -483,7 +483,7 @@ void BScrollBar::GetPreferredSize(float *width, float *height) { } -void BScrollBar::MakeFocus(bool state = true) +void BScrollBar::MakeFocus(bool state) { if(fTarget) fTarget->MakeFocus(state); diff --git a/src/kits/interface/StringView.cpp b/src/kits/interface/StringView.cpp index eba8b85c52..c0846375ae 100644 --- a/src/kits/interface/StringView.cpp +++ b/src/kits/interface/StringView.cpp @@ -224,7 +224,7 @@ BHandler* BStringView::ResolveSpecifier(BMessage* msg, int32 index, return NULL; } //------------------------------------------------------------------------------ -void BStringView::MakeFocus(bool state = true) +void BStringView::MakeFocus(bool state) { BView::MakeFocus(state); } diff --git a/src/kits/interface/TextControl.cpp b/src/kits/interface/TextControl.cpp index c0147c0aba..1738611e5d 100644 --- a/src/kits/interface/TextControl.cpp +++ b/src/kits/interface/TextControl.cpp @@ -129,7 +129,7 @@ BArchivable* BTextControl::Instantiate(BMessage* data) return new BTextControl(data); } //------------------------------------------------------------------------------ -status_t BTextControl::Archive(BMessage* data, bool deep = true) const +status_t BTextControl::Archive(BMessage* data, bool deep) const { // TODO: compare against original version and finish status_t err = BView::Archive(data, deep); @@ -281,6 +281,7 @@ void BTextControl::MouseDown(BPoint where) MakeFocus(true); } } +//------------------------------------------------------------------------------ void BTextControl::AttachedToWindow() { BControl::AttachedToWindow(); @@ -295,7 +296,8 @@ void BTextControl::AttachedToWindow() ResizeTo(Bounds().Width(), h); fText->ResizeTo(fText->Bounds().Width(), h); } -void BTextControl::MakeFocus(bool state = true) +//------------------------------------------------------------------------------ +void BTextControl::MakeFocus(bool state) { if (IsEnabled()) {