* Moved child creation to the constructor; it doesn't seem to have any negative
effect, and DetachedFromWindow() was not symmetrical to AttachedToWindow(), and would have leaked the children if called without destroying inbetween. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36888 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -86,6 +86,11 @@ TBarView::TBarView(BRect frame, bool vertical, bool left, bool top,
|
|||||||
fMaxRecentApps(kDefaultRecentAppCount),
|
fMaxRecentApps(kDefaultRecentAppCount),
|
||||||
fLastDragItem(NULL)
|
fLastDragItem(NULL)
|
||||||
{
|
{
|
||||||
|
fReplicantTray = new TReplicantTray(this, fVertical);
|
||||||
|
fDragRegion = new TDragRegion(this, fReplicantTray);
|
||||||
|
fDragRegion->AddChild(fReplicantTray);
|
||||||
|
if (fTrayLocation != 0)
|
||||||
|
AddChild(fDragRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -104,12 +109,6 @@ TBarView::AttachedToWindow()
|
|||||||
SetViewColor(ui_color(B_MENU_BACKGROUND_COLOR));
|
SetViewColor(ui_color(B_MENU_BACKGROUND_COLOR));
|
||||||
SetFont(be_plain_font);
|
SetFont(be_plain_font);
|
||||||
|
|
||||||
fReplicantTray = new TReplicantTray(this, fVertical);
|
|
||||||
fDragRegion = new TDragRegion(this, fReplicantTray);
|
|
||||||
fDragRegion->AddChild(fReplicantTray);
|
|
||||||
if (fTrayLocation != 0)
|
|
||||||
AddChild(fDragRegion);
|
|
||||||
|
|
||||||
UpdateAutoRaise();
|
UpdateAutoRaise();
|
||||||
UpdatePlacement();
|
UpdatePlacement();
|
||||||
|
|
||||||
@@ -576,6 +575,7 @@ TBarView::ShowingClock() const
|
|||||||
|
|
||||||
// #pragma mark - Drag and Drop
|
// #pragma mark - Drag and Drop
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TBarView::CacheDragData(const BMessage* incoming)
|
TBarView::CacheDragData(const BMessage* incoming)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user