* Recognized any values instead of just boolean ones. This fixes bug #186.
* Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16545 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -44,7 +44,7 @@ BCheckBox::Instantiate(BMessage *archive)
|
|||||||
{
|
{
|
||||||
if (validate_instantiation(archive, "BCheckBox"))
|
if (validate_instantiation(archive, "BCheckBox"))
|
||||||
return new BCheckBox(archive);
|
return new BCheckBox(archive);
|
||||||
else
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -334,6 +334,9 @@ BCheckBox::DetachedFromWindow()
|
|||||||
void
|
void
|
||||||
BCheckBox::SetValue(int32 value)
|
BCheckBox::SetValue(int32 value)
|
||||||
{
|
{
|
||||||
|
value = value ? B_CONTROL_ON : B_CONTROL_OFF;
|
||||||
|
// we only accept boolean values
|
||||||
|
|
||||||
if (value != Value()) {
|
if (value != Value()) {
|
||||||
BControl::SetValueNoUpdate(value);
|
BControl::SetValueNoUpdate(value);
|
||||||
Invalidate(_CheckBoxFrame());
|
Invalidate(_CheckBoxFrame());
|
||||||
@@ -391,8 +394,7 @@ BCheckBox::FrameResized(float width, float height)
|
|||||||
|
|
||||||
BHandler *
|
BHandler *
|
||||||
BCheckBox::ResolveSpecifier(BMessage *message, int32 index,
|
BCheckBox::ResolveSpecifier(BMessage *message, int32 index,
|
||||||
BMessage *specifier, int32 what,
|
BMessage *specifier, int32 what, const char *property)
|
||||||
const char *property)
|
|
||||||
{
|
{
|
||||||
return BControl::ResolveSpecifier(message, index, specifier, what, property);
|
return BControl::ResolveSpecifier(message, index, specifier, what, property);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user