// Checked: 2010-02-28 (RLVa-1.4.0a) | Added: RLVa-1.2.0a
void RlvUIEnabler::onToggleShowMinimap()
{
    bool fEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWMINIMAP);

    // Start or stop filtering showing the mini-map floater
    if (!fEnable)
        addGenericFloaterFilter("mini_map");
    else
        removeGenericFloaterFilter("mini_map");

    // Hide the mini-map floater if it's currently visible (or restore it if it was previously visible)
    static bool fPrevVisibile = false;
    if ( (!fEnable) && ((fPrevVisibile = LLFloaterReg::instanceVisible("mini_map"))) )
        LLFloaterReg::hideInstance("mini_map");
    else if ( (fEnable) && (fPrevVisibile) )
        LLFloaterReg::showInstance("mini_map");

    // Break/reestablish the visibility connection for the nearby people panel embedded minimap instance
    LLPanel* pPeoplePanel = LLFloaterSidePanelContainer::getPanel("people", "panel_people");
    LLPanel* pNetMapPanel = (pPeoplePanel) ? pPeoplePanel->getChild<LLPanel>("minimaplayout", TRUE) : NULL;  //AO: firestorm specific
    RLV_ASSERT( (pPeoplePanel) && (pNetMapPanel) );
    if (pNetMapPanel)
    {
        pNetMapPanel->setMakeVisibleControlVariable( (fEnable) ? gSavedSettings.getControl("ShowRadarMinimap").get() : NULL);
        // Reestablishing the visiblity connection will show the panel if needed so we only need to take care of hiding it when needed
        if ( (!fEnable) && (pNetMapPanel->getVisible()) )
            pNetMapPanel->setVisible(false);
    }

    // Break/reestablish the visibility connection for the radar panel embedded minimap instance
    LLFloater* pRadarFloater = LLFloaterReg::getInstance("fs_radar");
    LLPanel* pRadarNetMapPanel = (pRadarFloater) ? pRadarFloater->getChild<LLPanel>("minimaplayout", TRUE) : NULL;  //AO: firestorm specific
    RLV_ASSERT( (pRadarFloater) && (pRadarNetMapPanel) );
    if (pRadarNetMapPanel)
    {
        pRadarNetMapPanel->setMakeVisibleControlVariable( (fEnable) ? gSavedSettings.getControl("ShowRadarMinimap").get() : NULL);
        // Reestablishing the visiblity connection will show the panel if needed so we only need to take care of hiding it when needed
        if ( (!fEnable) && (pRadarNetMapPanel->getVisible()) )
            pRadarNetMapPanel->setVisible(false);
    }
}