--HG--
branch : product-engine
master
Mike Antipov 2010-04-21 17:34:28 +03:00
commit 7bd93fb12e
4 changed files with 34 additions and 15 deletions

View File

@ -645,6 +645,23 @@ void LLPanelPeople::onChange(EStatusType status, const std::string &channelURI,
updateButtons();
}
void LLPanelPeople::updateFriendListHelpText()
{
// show special help text for just created account to help finding friends. EXT-4836
static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_help_text");
// Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...)
// So, lets check all lists to avoid overlapping the text with online list. See EXT-6448.
bool any_friend_exists = mAllFriendList->filterHasMatches() || mOnlineFriendList->filterHasMatches();
no_friends_text->setVisible(!any_friend_exists);
if (no_friends_text->getVisible())
{
//update help text for empty lists
std::string message_name = mFilterSubString.empty() ? "no_friends_msg" : "no_filtered_friends_msg";
no_friends_text->setText(getString(message_name));
}
}
void LLPanelPeople::updateFriendList()
{
if (!mOnlineFriendList || !mAllFriendList)
@ -684,14 +701,6 @@ void LLPanelPeople::updateFriendList()
online_friendsp.push_back(buddy_id);
}
// show special help text for just created account to help found friends. EXT-4836
static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_msg");
// Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...)
// So, lets check all lists to avoid overlapping the text with online list. See EXT-6448.
bool any_friend_exists = (all_friendsp.size() > 0) || (online_friendsp.size() > 0);
no_friends_text->setVisible(!any_friend_exists);
/*
* Avatarlists will be hidden by showFriendsAccordionsIfNeeded(), if they do not have items.
* But avatarlist can be updated only if it is visible @see LLAvatarList::draw();
@ -1436,6 +1445,9 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded()
// Rearrange accordions
LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("friends_accordion");
accordion->arrange();
// keep help text in a synchronization with accordions visibility.
updateFriendListHelpText();
}
}

View File

@ -73,6 +73,7 @@ private:
} ESortOrder;
// methods indirectly called by the updaters
void updateFriendListHelpText();
void updateFriendList();
void updateNearbyList();
void updateRecentList();

View File

@ -29,6 +29,15 @@
<string
name="no_friends"
value="No friends" />
<string
name="no_friends_msg">
Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend.
Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map].
</string>
<string
name="no_filtered_friends_msg">
Didn't find what you're looking for? Try [secondlife:///app/search/people Search].
</string>
<string
name="people_filter_label"
value="Filter People" />
@ -265,14 +274,11 @@
<text
follows="all"
height="450"
left="10"
name="no_friends_msg"
left="13"
name="no_friends_help_text"
top="10"
width="293"
wrap="true">
Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend.
Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map].
</text>
wrap="true" />
</panel>
<panel
background_opaque="true"

View File

@ -1842,7 +1842,7 @@ Clears (deletes) the media and all params from the given face.
<string name="LeaveMouselook">Press ESC to return to World View</string>
<!-- inventory -->
<string name="InventoryNoMatchingItems">No matching items found in inventory. Try [secondlife:///app/search/groups "Search"].</string>
<string name="InventoryNoMatchingItems">Didn't find what you're looking for? Try [secondlife:///app/search/all Search].</string>
<string name="FavoritesNoMatchingItems">Drag a landmark here to add it to your favorites.</string>
<string name="InventoryNoTexture">You do not have a copy of this texture in your inventory</string>
<!-- use value="" because they have preceding spaces -->