call BView::Archive() first, pass deep when needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -75,7 +75,6 @@ BDragger::BDragger(BMessage *data)
|
|||||||
fBitmap->SetBits(kHandBitmap, fBitmap->BitsLength(), 0, B_CMAP8);
|
fBitmap->SetBits(kHandBitmap, fBitmap->BitsLength(), 0, B_CMAP8);
|
||||||
|
|
||||||
BMessage popupMsg;
|
BMessage popupMsg;
|
||||||
|
|
||||||
if (data->FindMessage("_popup", &popupMsg) == B_OK) {
|
if (data->FindMessage("_popup", &popupMsg) == B_OK) {
|
||||||
BArchivable *archivable = instantiate_object(&popupMsg);
|
BArchivable *archivable = instantiate_object(&popupMsg);
|
||||||
|
|
||||||
@@ -98,28 +97,28 @@ BDragger::Instantiate(BMessage *data)
|
|||||||
{
|
{
|
||||||
if (validate_instantiation(data, "BDragger"))
|
if (validate_instantiation(data, "BDragger"))
|
||||||
return new BDragger(data);
|
return new BDragger(data);
|
||||||
else
|
return NULL;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BDragger::Archive(BMessage *data, bool deep) const
|
BDragger::Archive(BMessage *data, bool deep) const
|
||||||
{
|
{
|
||||||
BMessage popupMsg;
|
status_t ret = BView::Archive(data, deep);
|
||||||
status_t ret = B_OK;
|
if (ret != B_OK)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
BMessage popupMsg;
|
||||||
|
|
||||||
if (fPopUp) {
|
if (fPopUp) {
|
||||||
ret = fPopUp->Archive(&popupMsg);
|
ret = fPopUp->Archive(&popupMsg, deep);
|
||||||
if (ret == B_OK)
|
if (ret == B_OK)
|
||||||
ret = data->AddMessage("_popup", &popupMsg);
|
ret = data->AddMessage("_popup", &popupMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == B_OK)
|
if (ret == B_OK)
|
||||||
ret = data->AddInt32("_rel", fRelation);
|
ret = data->AddInt32("_rel", fRelation);
|
||||||
if (ret != B_OK)
|
return ret;
|
||||||
return ret;
|
|
||||||
return BView::Archive(data, deep);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user