Fixed warnings.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8196 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-06-27 21:36:42 +00:00
parent ed52cdfd58
commit db11bebffc
+7 -7
View File
@@ -25,6 +25,8 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Standard Includes ----------------------------------------------------------- // Standard Includes -----------------------------------------------------------
#include <stdlib.h>
#include <string.h>
// System Includes ------------------------------------------------------------- // System Includes -------------------------------------------------------------
#include <MenuBar.h> #include <MenuBar.h>
@@ -255,10 +257,9 @@ void BMenuField::MouseDown(BPoint where)
if (where.x > fDivider && !fMenuBar->Frame().Contains(where)) if (where.x > fDivider && !fMenuBar->Frame().Contains(where))
return; return;
BRect bounds(Bounds()); BRect bounds = fMenuBar->ConvertFromParent(Bounds());
fMenuBar->StartMenuBar(0, false, true, fMenuBar->StartMenuBar(0, false, true, &bounds);
&fMenuBar->ConvertFromParent(bounds));
fMenuTaskID = spawn_thread((thread_func)MenuTask, "_m_task_", fMenuTaskID = spawn_thread((thread_func)MenuTask, "_m_task_",
B_NORMAL_PRIORITY, this); B_NORMAL_PRIORITY, this);
@@ -275,10 +276,9 @@ void BMenuField::KeyDown(const char *bytes, int32 numBytes)
case B_RIGHT_ARROW: case B_RIGHT_ARROW:
case B_DOWN_ARROW: case B_DOWN_ARROW:
{ {
BRect bounds(Bounds()); BRect bounds = fMenuBar->ConvertFromParent(Bounds());
fMenuBar->StartMenuBar(0, true, true, fMenuBar->StartMenuBar(0, true, true, &bounds);
&fMenuBar->ConvertFromParent(bounds));
fSelected = true; fSelected = true;
fTransition = true; fTransition = true;
@@ -547,7 +547,7 @@ void BMenuField::InitMenu(BMenu *menu)
int32 index = 0; int32 index = 0;
BMenu *subMenu; BMenu *subMenu;
while (subMenu = menu->SubmenuAt(index++)) while ((subMenu = menu->SubmenuAt(index++)) != NULL)
InitMenu(subMenu); InitMenu(subMenu);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------