// static 
void LLTabContainer::onTabBtn( void* userdata )
{
	LLTabTuple* tuple = (LLTabTuple*) userdata;
	LLTabContainer* self = tuple->mTabContainer;
	self->selectTabPanel( tuple->mTabPanel );

	tuple->mTabPanel->setFocus(TRUE);
}
void LLFloaterFacebook::showPhotoPanel()
{
	LLTabContainer* parent = dynamic_cast<LLTabContainer*>(mFacebookPhotoPanel->getParent());
	if (!parent)
	{
		LL_WARNS() << "Cannot find panel container" << LL_ENDL;
		return;
	}

	parent->selectTabPanel(mFacebookPhotoPanel);
}
Beispiel #3
0
void LLPanelNearByMedia::onAdvancedButtonClick()
{	
	// bring up the prefs floater
	LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*>(LLFloaterReg::showInstance("preferences"));
	if (prefsfloater)
	{
		// grab the 'audio' panel from the preferences floater and
		// bring it the front!
		LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
		LLPanel* audiopanel = prefsfloater->getChild<LLPanel>("audio");
		if (tabcontainer && audiopanel)
		{
			tabcontainer->selectTabPanel(audiopanel);
		}
	}
}
void LLPanelVolumePulldown::onAdvancedButtonClick(const LLSD& user_data)
{
	// close the global volume minicontrol, we're bringing up the big one
	setVisible(FALSE);

	// bring up the prefs floater
	LLFloaterPreference* prefsfloater = dynamic_cast<LLFloaterPreference*>
		(LLFloaterReg::showInstance("preferences"));
	if (prefsfloater)
	{
		// grab the 'audio' panel from the preferences floater and
		// bring it the front!
		LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
		LLPanel* audiopanel = prefsfloater->getChild<LLPanel>("audio");
		if (tabcontainer && audiopanel)
		{
			tabcontainer->selectTabPanel(audiopanel);
		}
	}
}
// Checked: 2011-11-04 (RLVa-1.4.4a) | Modified: RLVa-1.4.4a
void RlvUIEnabler::onToggleShowInv(bool fQuitting)
{
    if (fQuitting)
        return;	// Nothing to do if the viewer is shutting down

    bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV);

    //
    // When disabling, close any inventory floaters that may be open
    //
    if (!fEnable)
    {
        LLFloaterReg::const_instance_list_t lFloaters = LLFloaterReg::getFloaterList("inventory");
        for (LLFloaterReg::const_instance_list_t::const_iterator itFloater = lFloaters.begin(); itFloater != lFloaters.end(); ++itFloater)
            (*itFloater)->closeFloater();

        LLFloaterReg::const_instance_list_t lSecFloaters = LLFloaterReg::getFloaterList("secondary_inventory");
        for (LLFloaterReg::const_instance_list_t::const_iterator itSecFloater = lSecFloaters.begin(); itSecFloater != lSecFloaters.end(); ++itSecFloater)
            (*itSecFloater)->closeFloater();
    }

    //
    // Enable/disable the "My Outfits" panel on the "My Appearance" sidebar tab
    //
    LLPanelOutfitsInventory* pAppearancePanel = LLPanelOutfitsInventory::findInstance();
    RLV_ASSERT(pAppearancePanel);
    if (pAppearancePanel)
    {
        LLTabContainer* pAppearanceTabs = pAppearancePanel->getAppearanceTabs();
        LLOutfitsList* pMyOutfitsPanel = pAppearancePanel->getMyOutfitsPanel();
        if ( (pAppearanceTabs) && (pMyOutfitsPanel) )
        {
            S32 idxTab = pAppearanceTabs->getIndexForPanel(pMyOutfitsPanel);
            RLV_ASSERT(-1 != idxTab);
            pAppearanceTabs->enableTabButton(idxTab, fEnable);

            // When disabling, switch to the COF tab if "My Outfits" is currently active
            if ( (!fEnable) && (pAppearanceTabs->getCurrentPanelIndex() == idxTab) )
                pAppearanceTabs->selectTabPanel(pAppearancePanel->getCurrentOutfitPanel());
        }

        LLSidepanelAppearance* pCOFPanel = pAppearancePanel->getAppearanceSP();
        RLV_ASSERT(pCOFPanel);
        if ( (!fEnable) && (pCOFPanel) && (pCOFPanel->isOutfitEditPanelVisible()) )
        {
            // TODO-RLVa: we should really just be collapsing the "Add more..." inventory panel (and disable the button)
            pCOFPanel->showOutfitsInventoryPanel();
        }
    }

    //
    // Filter (or stop filtering) opening new inventory floaters
    //
    // <FS:Ansariel> Modified for FIRE-8804
    if (!fEnable)
    {
        addGenericFloaterFilter("inventory");
        addGenericFloaterFilter("secondary_inventory");
    }
    else
    {
        removeGenericFloaterFilter("inventory");
        removeGenericFloaterFilter("secondary_inventory");
    }
}