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 AttachedToWindow();
|
||||||
virtual void DetachedFromWindow();
|
virtual void DetachedFromWindow();
|
||||||
virtual void MouseDown(BPoint where);
|
|
||||||
|
|
||||||
void AttachScrollers();
|
void AttachScrollers();
|
||||||
void DetachScrollers();
|
void DetachScrollers();
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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 -
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user