void LLPanelPicks::showAccordion(const std::string& name, bool show) { LLAccordionCtrlTab* tab = getChild<LLAccordionCtrlTab>(name); tab->setVisible(show); LLAccordionCtrl* acc = getChild<LLAccordionCtrl>("accordion"); acc->arrange(); }
void LLPanelPeople::showFriendsAccordionsIfNeeded() { if(FRIENDS_TAB_NAME == getActiveTabName()) { // Expand and show accordions if needed, else - hide them showAccordion("tab_online", mOnlineFriendList->filterHasMatches()); showAccordion("tab_all", mAllFriendList->filterHasMatches()); // Rearrange accordions LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); accordion->arrange(); // *TODO: new no_matched_tabs_text attribute was implemented in accordion (EXT-7368). // this code should be refactored to use it // keep help text in a synchronization with accordions visibility. updateFriendListHelpText(); } }
void LLFacebookFriendsPanel::showFriendsAccordionsIfNeeded() { // Show / hide the status text : needs to be done *before* showing / hidding the accordions if (!mSecondLifeFriends->filterHasMatches() && !mSuggestedFriends->filterHasMatches()) { // Show some explanation text if the lists are empty... mFriendsStatusCaption->setVisible(true); if (LLFacebookConnect::instance().isConnected()) { //...you're connected to FB but have no friends :( mFriendsStatusCaption->setText(getString("facebook_friends_empty")); } else { //...you're not connected to FB mFriendsStatusCaption->setText(getString("facebook_friends_no_connected")); } // Hide the lists getChild<LLAccordionCtrl>("friends_accordion")->setVisible(false); getChild<LLAccordionCtrlTab>("tab_second_life_friends")->setVisible(false); getChild<LLAccordionCtrlTab>("tab_suggested_friends")->setVisible(false); } else { // We have something in the lists, hide the explanatory text mFriendsStatusCaption->setVisible(false); // Show the lists LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion"); accordion->setVisible(true); // Expand and show accordions if needed, else - hide them getChild<LLAccordionCtrlTab>("tab_second_life_friends")->setVisible(mSecondLifeFriends->filterHasMatches()); getChild<LLAccordionCtrlTab>("tab_suggested_friends")->setVisible(mSuggestedFriends->filterHasMatches()); // Rearrange accordions accordion->arrange(); } }