Implemented unarchiving constructor more or less correctly. Minor cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16668 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-03-08 23:16:51 +00:00
parent 49b154d166
commit d8ca32c9aa
+9 -9
View File
@@ -60,8 +60,11 @@ BMenuBar::BMenuBar(BMessage *data)
if (data->FindInt32("_border", &border) == B_OK) if (data->FindInt32("_border", &border) == B_OK)
SetBorder((menu_bar_border)border); SetBorder((menu_bar_border)border);
// TODO: InitData() ?? menu_layout layout = B_ITEMS_IN_COLUMN;
data->FindInt32("_layout", (int32 *)&layout);
InitData(layout);
} }
@@ -81,8 +84,8 @@ BMenuBar::Instantiate(BMessage *data)
{ {
if (validate_instantiation(data, "BMenuBar")) if (validate_instantiation(data, "BMenuBar"))
return new BMenuBar(data); return new BMenuBar(data);
else
return NULL; return NULL;
} }
@@ -224,9 +227,7 @@ BMenuBar::Hide()
BHandler * BHandler *
BMenuBar::ResolveSpecifier(BMessage *msg, int32 index, BMenuBar::ResolveSpecifier(BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property)
BMessage *specifier, int32 form,
const char *property)
{ {
return BMenu::ResolveSpecifier(msg, index, specifier, form, property); return BMenu::ResolveSpecifier(msg, index, specifier, form, property);
} }
@@ -295,8 +296,7 @@ BMenuBar::operator=(const BMenuBar &)
void void
BMenuBar::StartMenuBar(int32 menuIndex, bool sticky, bool showMenu, BMenuBar::StartMenuBar(int32 menuIndex, bool sticky, bool showMenu, BRect *specialRect)
BRect *specialRect)
{ {
BWindow *window = Window(); BWindow *window = Window();
if (window == NULL) if (window == NULL)