diff --git a/headers/os/interface/MenuScrollView.h b/headers/os/interface/MenuScrollView.h index 1a1cb6dea9..37359a82fa 100644 --- a/headers/os/interface/MenuScrollView.h +++ b/headers/os/interface/MenuScrollView.h @@ -26,7 +26,6 @@ public: virtual void AttachedToWindow(); virtual void DetachedFromWindow(); - virtual void MouseDown(BPoint where); void AttachScrollers(); void DetachScrollers(); diff --git a/src/apps/deskbar/BarView.cpp b/src/apps/deskbar/BarView.cpp index a1307ea3b5..e915adf8e6 100644 --- a/src/apps/deskbar/BarView.cpp +++ b/src/apps/deskbar/BarView.cpp @@ -358,7 +358,7 @@ TBarView::PlaceDeskbarMenu() // top or bottom expando mode has Be menu built in for tracking // only for vertical mini or expanded // mini mode will have team menu added as part of BarMenuBar - if (fVertical && !fBarMenuBar) { + if (fVertical && fBarMenuBar == NULL) { // create the Be menu BRect mbarFrame(Bounds()); mbarFrame.bottom = mbarFrame.top + kMenuBarHeight; @@ -443,19 +443,17 @@ TBarView::PlaceTray(bool vertSwap, bool leftSwap) void TBarView::PlaceApplicationBar() { - if (fExpando != NULL) + if (fExpando != NULL) { SaveExpandedItems(); + fExpando->RemoveSelf(); + delete fExpando; + fExpando = NULL; + } if (fMenuScrollView != NULL) { fMenuScrollView->RemoveSelf(); delete fMenuScrollView; - // Also deletes fExpando fMenuScrollView = NULL; - fExpando = NULL; - } else if (fExpando != NULL) { - fExpando->RemoveSelf(); - delete fExpando; - fExpando = NULL; } BRect screenFrame = (BScreen(Window())).Frame(); @@ -467,8 +465,8 @@ TBarView::PlaceApplicationBar() return; } - BRect menuScrollFrame(0, 0, 0, 0); BRect expandoFrame(0, 0, 0, 0); + BRect menuScrollFrame(0, 0, 0, 0); if (fVertical) { // top left/right if (fTrayLocation != 0) diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp b/src/apps/deskbar/ExpandoMenuBar.cpp index 2b9bacbd97..d1ff430546 100644 --- a/src/apps/deskbar/ExpandoMenuBar.cpp +++ b/src/apps/deskbar/ExpandoMenuBar.cpp @@ -42,10 +42,10 @@ All rights reserved. #include #include #include +#include #include #include #include -#include #include "icons.h" diff --git a/src/apps/deskbar/TeamMenuItem.cpp b/src/apps/deskbar/TeamMenuItem.cpp index 0f6fa4c4dc..dd0e07347c 100644 --- a/src/apps/deskbar/TeamMenuItem.cpp +++ b/src/apps/deskbar/TeamMenuItem.cpp @@ -559,7 +559,7 @@ TTeamMenuItem::ToggleExpandState(bool resizeWindow) sub->SetExpanded(true, myindex + childIndex); if (resizeWindow) - parent->SizeWindow(1); + parent->SizeWindow(-1); } } } else { diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 2833899973..6905c15605 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include @@ -2812,13 +2811,13 @@ BMenu::_ChooseTrigger(const char* title, int32& index, uint32& trigger, void BMenu::_UpdateWindowViewSize(const bool &move) { - if (dynamic_cast(this) != NULL) - return; - BMenuWindow* window = static_cast(Window()); if (window == NULL) return; + if (dynamic_cast(this) != NULL) + return; + if (!fResizeToFit) return; diff --git a/src/kits/interface/MenuBar.cpp b/src/kits/interface/MenuBar.cpp index fc47dc7d9c..b29f9d5ef5 100644 --- a/src/kits/interface/MenuBar.cpp +++ b/src/kits/interface/MenuBar.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/src/kits/interface/MenuScrollView.cpp b/src/kits/interface/MenuScrollView.cpp index 385988100e..8bf9dd5486 100644 --- a/src/kits/interface/MenuScrollView.cpp +++ b/src/kits/interface/MenuScrollView.cpp @@ -171,12 +171,6 @@ BMenuScrollView::BMenuScrollView(BRect frame, BMenu* menu) BMenuScrollView::~BMenuScrollView() { - if (fMenu != NULL) { - fMenu->RemoveSelf(); - delete fMenu; - fMenu = NULL; - } - if (fUpperScroller != NULL) { fUpperScroller->RemoveSelf(); delete fUpperScroller; @@ -199,9 +193,8 @@ BMenuScrollView::AttachedToWindow() if (fMenu == NULL) return; - fMenu->MoveTo(0, 0); - AddChild(fMenu); + fMenu->MoveTo(0, 0); } @@ -221,13 +214,6 @@ BMenuScrollView::DetachedFromWindow() } -void -BMenuScrollView::MouseDown(BPoint where) -{ - -} - - // #pragma mark -