archives menu items in menu archive
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18053 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8703696801
commit
f1cc26391b
@ -282,7 +282,18 @@ BMenu::Archive(BMessage *data, bool deep) const
|
||||
if (err == B_OK)
|
||||
err = data->AddFloat("_maxwidth", fMaxContentWidth);
|
||||
if (err == B_OK && deep) {
|
||||
// TODO store items and rects
|
||||
int32 count = CountItems();
|
||||
for (int index=0; index<count; index++) {
|
||||
BMenuItem *item = ItemAt(index);
|
||||
BMessage itemData;
|
||||
item->Archive(&itemData);
|
||||
err = data->AddMessage("_items", &itemData);
|
||||
if (err != B_OK)
|
||||
break;
|
||||
if (fLayout == B_ITEMS_IN_MATRIX) {
|
||||
// TODO Store location of items
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user