fixed some Archive() following stippi's path
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17188 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -241,40 +241,44 @@ BSlider::Instantiate(BMessage *archive)
|
||||
status_t
|
||||
BSlider::Archive(BMessage *archive, bool deep) const
|
||||
{
|
||||
BControl::Archive(archive, deep);
|
||||
status_t ret = BControl::Archive(archive, deep);
|
||||
|
||||
if (ModificationMessage())
|
||||
archive->AddMessage("_mod_msg", ModificationMessage());
|
||||
if (ModificationMessage() && ret == B_OK)
|
||||
ret = archive->AddMessage("_mod_msg", ModificationMessage());
|
||||
|
||||
archive->AddInt32("_sdelay", fSnoozeAmount);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_sdelay", fSnoozeAmount);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_bcolor", _color_to_long_(fBarColor));
|
||||
|
||||
archive->AddInt32("_bcolor", _color_to_long_(fBarColor));
|
||||
if (FillColor(NULL) && ret == B_OK)
|
||||
ret = archive->AddInt32("_fcolor", _color_to_long_(fFillColor));
|
||||
|
||||
if (FillColor(NULL))
|
||||
archive->AddInt32("_fcolor", _color_to_long_(fFillColor));
|
||||
if (ret == B_OK && fMinLimitLabel)
|
||||
ret = archive->AddString("_minlbl", fMinLimitLabel);
|
||||
|
||||
if (fMinLimitLabel)
|
||||
archive->AddString("_minlbl", fMinLimitLabel);
|
||||
if (ret == B_OK && fMaxLimitLabel)
|
||||
ret = archive->AddString("_maxlbl", fMaxLimitLabel);
|
||||
|
||||
if (fMaxLimitLabel)
|
||||
archive->AddString("_maxlbl", fMaxLimitLabel);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_min", fMinValue);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_max", fMaxValue);
|
||||
|
||||
archive->AddInt32("_min", fMinValue);
|
||||
archive->AddInt32("_max", fMaxValue);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_incrementvalue", fKeyIncrementValue);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_hashcount", fHashMarkCount);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt16("_hashloc", fHashMarks);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt16("_sstyle", fStyle);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_orient", fOrientation);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddFloat("_bthickness", fBarThickness);
|
||||
|
||||
archive->AddInt32("_incrementvalue", fKeyIncrementValue);
|
||||
|
||||
archive->AddInt32("_hashcount", fHashMarkCount);
|
||||
|
||||
archive->AddInt16("_hashloc", fHashMarks);
|
||||
|
||||
archive->AddInt16("_sstyle", fStyle);
|
||||
|
||||
archive->AddInt32("_orient", fOrientation);
|
||||
|
||||
archive->AddFloat("_bthickness", fBarThickness);
|
||||
|
||||
return B_OK;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -402,30 +402,33 @@ BTabView::Archive(BMessage *archive, bool deep) const
|
||||
if (CountTabs() > 0)
|
||||
TabAt(Selection())->View()->RemoveSelf();
|
||||
|
||||
BView::Archive(archive, deep);
|
||||
status_t ret = BView::Archive(archive, deep);
|
||||
|
||||
archive->AddInt16("_but_width", fTabWidthSetting);
|
||||
archive->AddFloat("_high", fTabHeight);
|
||||
archive->AddInt32("_sel", fSelection);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt16("_but_width", fTabWidthSetting);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddFloat("_high", fTabHeight);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddInt32("_sel", fSelection);
|
||||
|
||||
if (deep) {
|
||||
if (ret == B_OK && deep) {
|
||||
for (int32 i = 0; i < CountTabs(); i++) {
|
||||
BMessage tabArchive;
|
||||
BTab *tab = TabAt(i);
|
||||
|
||||
if (!tab)
|
||||
continue;
|
||||
|
||||
if (tab->Archive(&tabArchive, true) == B_OK)
|
||||
archive->AddMessage("_l_items", &tabArchive);
|
||||
ret = tab->Archive(&tabArchive, true);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddMessage("_l_items", &tabArchive);
|
||||
|
||||
if (!tab->View())
|
||||
continue;
|
||||
|
||||
BMessage viewArchive;
|
||||
|
||||
if (tab->View()->Archive(&viewArchive, true) == B_OK)
|
||||
archive->AddMessage("_view_list", &viewArchive);
|
||||
ret = tab->View()->Archive(&viewArchive, true);
|
||||
if (ret == B_OK)
|
||||
ret = archive->AddMessage("_view_list", &viewArchive);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +437,7 @@ BTabView::Archive(BMessage *archive, bool deep) const
|
||||
TabAt(Selection())->Select(ContainerView());
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -86,20 +86,22 @@ BTextControl::Instantiate(BMessage *archive)
|
||||
status_t
|
||||
BTextControl::Archive(BMessage *data, bool deep) const
|
||||
{
|
||||
BView::Archive(data, deep);
|
||||
|
||||
status_t ret = BView::Archive(data, deep);
|
||||
alignment labelAlignment, textAlignment;
|
||||
|
||||
GetAlignment(&labelAlignment, &textAlignment);
|
||||
|
||||
data->AddInt32("_a_label", labelAlignment);
|
||||
data->AddInt32("_a_text", textAlignment);
|
||||
data->AddFloat("_divide", Divider());
|
||||
if (ret == B_OK)
|
||||
ret = data->AddInt32("_a_label", labelAlignment);
|
||||
if (ret == B_OK)
|
||||
ret = data->AddInt32("_a_text", textAlignment);
|
||||
if (ret == B_OK)
|
||||
ret = data->AddFloat("_divide", Divider());
|
||||
|
||||
if (ModificationMessage())
|
||||
data->AddMessage("_mod_msg", ModificationMessage());
|
||||
if (ModificationMessage() && (ret == B_OK))
|
||||
ret = data->AddMessage("_mod_msg", ModificationMessage());
|
||||
|
||||
return B_OK;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user