Tweaks, remove dead code. Menu and Menubar are stock again.
This commit is contained in:
@@ -26,7 +26,6 @@ public:
|
||||
|
||||
virtual void AttachedToWindow();
|
||||
virtual void DetachedFromWindow();
|
||||
virtual void MouseDown(BPoint where);
|
||||
|
||||
void AttachScrollers();
|
||||
void DetachScrollers();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -42,10 +42,10 @@ All rights reserved.
|
||||
#include <Bitmap.h>
|
||||
#include <ControlLook.h>
|
||||
#include <Debug.h>
|
||||
#include <MenuScrollView.h>
|
||||
#include <NodeInfo.h>
|
||||
#include <Roster.h>
|
||||
#include <Screen.h>
|
||||
#include <MenuScrollView.h>
|
||||
|
||||
#include "icons.h"
|
||||
|
||||
|
||||
@@ -559,7 +559,7 @@ TTeamMenuItem::ToggleExpandState(bool resizeWindow)
|
||||
sub->SetExpanded(true, myindex + childIndex);
|
||||
|
||||
if (resizeWindow)
|
||||
parent->SizeWindow(1);
|
||||
parent->SizeWindow(-1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include <PropertyInfo.h>
|
||||
#include <Screen.h>
|
||||
#include <ScrollBar.h>
|
||||
#include <ScrollMenu.h>
|
||||
#include <SystemCatalog.h>
|
||||
#include <Window.h>
|
||||
|
||||
@@ -2812,13 +2811,13 @@ BMenu::_ChooseTrigger(const char* title, int32& index, uint32& trigger,
|
||||
void
|
||||
BMenu::_UpdateWindowViewSize(const bool &move)
|
||||
{
|
||||
if (dynamic_cast<BMenuBar*>(this) != NULL)
|
||||
return;
|
||||
|
||||
BMenuWindow* window = static_cast<BMenuWindow*>(Window());
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
if (dynamic_cast<BMenuBar*>(this) != NULL)
|
||||
return;
|
||||
|
||||
if (!fResizeToFit)
|
||||
return;
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <ControlLook.h>
|
||||
#include <LayoutUtils.h>
|
||||
#include <MenuItem.h>
|
||||
#include <MenuScrollView.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <AppMisc.h>
|
||||
|
||||
@@ -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 -
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user