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 AttachedToWindow();
virtual void DetachedFromWindow(); virtual void DetachedFromWindow();
virtual void MouseDown(BPoint where);
void AttachScrollers(); void AttachScrollers();
void DetachScrollers(); void DetachScrollers();
+7 -9
View File
@@ -358,7 +358,7 @@ TBarView::PlaceDeskbarMenu()
// top or bottom expando mode has Be menu built in for tracking // top or bottom expando mode has Be menu built in for tracking
// only for vertical mini or expanded // only for vertical mini or expanded
// mini mode will have team menu added as part of BarMenuBar // mini mode will have team menu added as part of BarMenuBar
if (fVertical && !fBarMenuBar) { if (fVertical && fBarMenuBar == NULL) {
// create the Be menu // create the Be menu
BRect mbarFrame(Bounds()); BRect mbarFrame(Bounds());
mbarFrame.bottom = mbarFrame.top + kMenuBarHeight; mbarFrame.bottom = mbarFrame.top + kMenuBarHeight;
@@ -443,19 +443,17 @@ TBarView::PlaceTray(bool vertSwap, bool leftSwap)
void void
TBarView::PlaceApplicationBar() TBarView::PlaceApplicationBar()
{ {
if (fExpando != NULL) if (fExpando != NULL) {
SaveExpandedItems(); SaveExpandedItems();
fExpando->RemoveSelf();
delete fExpando;
fExpando = NULL;
}
if (fMenuScrollView != NULL) { if (fMenuScrollView != NULL) {
fMenuScrollView->RemoveSelf(); fMenuScrollView->RemoveSelf();
delete fMenuScrollView; delete fMenuScrollView;
// Also deletes fExpando
fMenuScrollView = NULL; fMenuScrollView = NULL;
fExpando = NULL;
} else if (fExpando != NULL) {
fExpando->RemoveSelf();
delete fExpando;
fExpando = NULL;
} }
BRect screenFrame = (BScreen(Window())).Frame(); BRect screenFrame = (BScreen(Window())).Frame();
@@ -467,8 +465,8 @@ TBarView::PlaceApplicationBar()
return; return;
} }
BRect menuScrollFrame(0, 0, 0, 0);
BRect expandoFrame(0, 0, 0, 0); BRect expandoFrame(0, 0, 0, 0);
BRect menuScrollFrame(0, 0, 0, 0);
if (fVertical) { if (fVertical) {
// top left/right // top left/right
if (fTrayLocation != 0) if (fTrayLocation != 0)
+1 -1
View File
@@ -42,10 +42,10 @@ All rights reserved.
#include <Bitmap.h> #include <Bitmap.h>
#include <ControlLook.h> #include <ControlLook.h>
#include <Debug.h> #include <Debug.h>
#include <MenuScrollView.h>
#include <NodeInfo.h> #include <NodeInfo.h>
#include <Roster.h> #include <Roster.h>
#include <Screen.h> #include <Screen.h>
#include <MenuScrollView.h>
#include "icons.h" #include "icons.h"
+1 -1
View File
@@ -559,7 +559,7 @@ TTeamMenuItem::ToggleExpandState(bool resizeWindow)
sub->SetExpanded(true, myindex + childIndex); sub->SetExpanded(true, myindex + childIndex);
if (resizeWindow) if (resizeWindow)
parent->SizeWindow(1); parent->SizeWindow(-1);
} }
} }
} else { } else {
+3 -4
View File
@@ -30,7 +30,6 @@
#include <PropertyInfo.h> #include <PropertyInfo.h>
#include <Screen.h> #include <Screen.h>
#include <ScrollBar.h> #include <ScrollBar.h>
#include <ScrollMenu.h>
#include <SystemCatalog.h> #include <SystemCatalog.h>
#include <Window.h> #include <Window.h>
@@ -2812,13 +2811,13 @@ BMenu::_ChooseTrigger(const char* title, int32& index, uint32& trigger,
void void
BMenu::_UpdateWindowViewSize(const bool &move) BMenu::_UpdateWindowViewSize(const bool &move)
{ {
if (dynamic_cast<BMenuBar*>(this) != NULL)
return;
BMenuWindow* window = static_cast<BMenuWindow*>(Window()); BMenuWindow* window = static_cast<BMenuWindow*>(Window());
if (window == NULL) if (window == NULL)
return; return;
if (dynamic_cast<BMenuBar*>(this) != NULL)
return;
if (!fResizeToFit) if (!fResizeToFit)
return; return;
-1
View File
@@ -18,7 +18,6 @@
#include <ControlLook.h> #include <ControlLook.h>
#include <LayoutUtils.h> #include <LayoutUtils.h>
#include <MenuItem.h> #include <MenuItem.h>
#include <MenuScrollView.h>
#include <Window.h> #include <Window.h>
#include <AppMisc.h> #include <AppMisc.h>
+1 -15
View File
@@ -171,12 +171,6 @@ BMenuScrollView::BMenuScrollView(BRect frame, BMenu* menu)
BMenuScrollView::~BMenuScrollView() BMenuScrollView::~BMenuScrollView()
{ {
if (fMenu != NULL) {
fMenu->RemoveSelf();
delete fMenu;
fMenu = NULL;
}
if (fUpperScroller != NULL) { if (fUpperScroller != NULL) {
fUpperScroller->RemoveSelf(); fUpperScroller->RemoveSelf();
delete fUpperScroller; delete fUpperScroller;
@@ -199,9 +193,8 @@ BMenuScrollView::AttachedToWindow()
if (fMenu == NULL) if (fMenu == NULL)
return; return;
fMenu->MoveTo(0, 0);
AddChild(fMenu); AddChild(fMenu);
fMenu->MoveTo(0, 0);
} }
@@ -221,13 +214,6 @@ BMenuScrollView::DetachedFromWindow()
} }
void
BMenuScrollView::MouseDown(BPoint where)
{
}
// #pragma mark - // #pragma mark -