Tweaks, remove dead code. Menu and Menubar are stock again.

This commit is contained in:
John Scipione
2012-11-12 22:03:18 -05:00
parent 7ee3b479d1
commit afa1c29104
7 changed files with 13 additions and 32 deletions
-1
View File
@@ -26,7 +26,6 @@ public:
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
virtual void MouseDown(BPoint where);
void AttachScrollers();
void DetachScrollers();
+7 -9
View File
@@ -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)
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -559,7 +559,7 @@ TTeamMenuItem::ToggleExpandState(bool resizeWindow)
sub->SetExpanded(true, myindex + childIndex);
if (resizeWindow)
parent->SizeWindow(1);
parent->SizeWindow(-1);
}
}
} else {
+3 -4
View File
@@ -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;
-1
View File
@@ -18,7 +18,6 @@
#include <ControlLook.h>
#include <LayoutUtils.h>
#include <MenuItem.h>
#include <MenuScrollView.h>
#include <Window.h>
#include <AppMisc.h>
+1 -15
View File
@@ -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 -