From f1cc26391b11ee097815821e4049be20350f7d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Fri, 7 Jul 2006 15:51:40 +0000 Subject: [PATCH] archives menu items in menu archive git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18053 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Menu.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 69b4e321d8..23831cb83f 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -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; indexArchive(&itemData); + err = data->AddMessage("_items", &itemData); + if (err != B_OK) + break; + if (fLayout == B_ITEMS_IN_MATRIX) { + // TODO Store location of items + } + } } return err;