MenuItem::Archive uses BArchivable::Archive
inverted the enable state when initing the BMenu git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18071 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1161,7 +1161,9 @@ BMenu::InitData(BMessage *data)
|
||||
if (data != NULL) {
|
||||
data->FindInt32("_layout", (int32 *)&fLayout);
|
||||
data->FindBool("_rsize_to_fit", &fResizeToFit);
|
||||
data->FindBool("_disable", &fEnabled);
|
||||
bool disabled;
|
||||
if (data->FindBool("_disable", &disabled) == B_OK)
|
||||
fEnabled = !disabled;
|
||||
data->FindBool("_radio", &fRadioMode);
|
||||
|
||||
bool disableTrigger = false;
|
||||
|
||||
@@ -179,16 +179,11 @@ BMenuItem::Instantiate(BMessage *data)
|
||||
}
|
||||
|
||||
|
||||
extern const char* B_CLASS_FIELD;
|
||||
|
||||
|
||||
status_t
|
||||
BMenuItem::Archive(BMessage *data, bool deep) const
|
||||
{
|
||||
status_t ret = B_OK;
|
||||
if (!data->HasString(B_CLASS_FIELD))
|
||||
ret = data->AddString(B_CLASS_FIELD, "BMenuItem");
|
||||
|
||||
status_t ret = BArchivable::Archive(data, deep);
|
||||
|
||||
if (ret == B_OK && fLabel)
|
||||
ret = data->AddString("_label", Label());
|
||||
|
||||
|
||||
@@ -33,14 +33,9 @@ BSeparatorItem::~BSeparatorItem()
|
||||
}
|
||||
|
||||
|
||||
extern const char* B_CLASS_FIELD;
|
||||
|
||||
status_t
|
||||
BSeparatorItem::Archive(BMessage* archive, bool deep) const
|
||||
{
|
||||
if (!archive->HasString(B_CLASS_FIELD))
|
||||
archive->AddString(B_CLASS_FIELD, "BMenuItem");
|
||||
|
||||
return BMenuItem::Archive(archive, deep);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user