Deskbar: Move ExpandoMenuBar name to constructor

... instead of passing it in from BarView.
This commit is contained in:
John Scipione
2015-02-23 14:42:16 -05:00
parent 2bb1829853
commit 4f4cab958e
3 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ TBarView::TBarView(BRect frame, bool vertical, bool left, bool top,
AddChild(fDragRegion); AddChild(fDragRegion);
// create and add the application menubar // create and add the application menubar
fExpandoMenuBar = new TExpandoMenuBar("ExpandoMenuBar", this, fVertical); fExpandoMenuBar = new TExpandoMenuBar(this, fVertical);
fInlineScrollView = new TInlineScrollView(fExpandoMenuBar, fInlineScrollView = new TInlineScrollView(fExpandoMenuBar,
fVertical ? B_VERTICAL : B_HORIZONTAL); fVertical ? B_VERTICAL : B_HORIZONTAL);
AddChild(fInlineScrollView); AddChild(fInlineScrollView);
+2 -3
View File
@@ -85,10 +85,9 @@ typedef std::map<BString, TTeamMenuItem*> TeamMenuItemMap;
// #pragma mark - TExpandoMenuBar // #pragma mark - TExpandoMenuBar
TExpandoMenuBar::TExpandoMenuBar(const char* name, TBarView* barView, TExpandoMenuBar::TExpandoMenuBar(TBarView* barView, bool vertical)
bool vertical)
: :
BMenuBar(BRect(0, 0, 0, 0), name, B_FOLLOW_NONE, BMenuBar(BRect(0, 0, 0, 0), "ExpandoMenuBar", B_FOLLOW_NONE,
vertical ? B_ITEMS_IN_COLUMN : B_ITEMS_IN_ROW), vertical ? B_ITEMS_IN_COLUMN : B_ITEMS_IN_ROW),
fBarView(barView), fBarView(barView),
fVertical(vertical), fVertical(vertical),
+1 -2
View File
@@ -61,8 +61,7 @@ class TTeamMenuItem;
class TExpandoMenuBar : public BMenuBar { class TExpandoMenuBar : public BMenuBar {
public: public:
TExpandoMenuBar(const char* name, TExpandoMenuBar(TBarView* barView, bool vertical);
TBarView* barView, bool vertical);
virtual void AttachedToWindow(); virtual void AttachedToWindow();
virtual void DetachedFromWindow(); virtual void DetachedFromWindow();