void BSlowContextMenu::AttachedToWindow() { // showing flag is set immediately as // it may take a while to build the menu's // contents. // // it should get set only once when Go is called // and will get reset in DetachedFromWindow // // this flag is used in ContainerWindow::ShowContextMenu // to determine whether we should show this menu, and // the only reason we need to do this is because this // menu is spawned ::Go as an asynchronous menu, which // is done because we will deadlock if the target's // window is open... so there fIsShowing = true; BPopUpMenu::AttachedToWindow(); SpringLoadedFolderSetMenuStates(this, fTypesList); // allow an opportunity to reset the target for each of the items SetTargetForItems(Target()); }
void BNavMenu::AttachedToWindow() { BSlowMenu::AttachedToWindow(); SpringLoadedFolderSetMenuStates(this, fTypesList); // if dragging (fTypesList != NULL) // set the menu items enabled state // relative to the ability to handle an item in the // drag message ResetTargets(); // allow an opportunity to reset the target for each of the items }