diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-13 13:32:39 +0300 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2010-04-13 13:32:39 +0300 |
commit | ab246784b069913363e544ab3c9a9fb615e0c71d (patch) | |
tree | d0884b7793c33f1d03c87a7b2ad36a8d351848b6 /indra/newview/llparticipantlist.cpp | |
parent | 4f20b91acdddc06b7e033afa42e19f993f7efb30 (diff) |
Fixed normal bug EXT-6034 (Need "View People Icons" option for group IM window) - added new menu item to participant list menu for group and ad-hoc chats.
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/225/.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llparticipantlist.cpp')
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index dbb8e962bd..026be882ed 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -39,6 +39,7 @@ #include "llparticipantlist.h" #include "llspeakers.h" +#include "llviewercontrol.h" #include "llviewermenu.h" #include "llvoiceclient.h" @@ -50,7 +51,7 @@ static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR; LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/, - bool exclude_agent /*= true*/): + bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), mSortOrder(E_SORT_BY_NAME) @@ -87,6 +88,12 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mAvatarList->setContextMenu(NULL); } + if (use_context_menu && can_toggle_icons) + { + mAvatarList->setShowIcons("ParticipantListShowIcons"); + mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList)); + } + //Lets fill avatarList with existing speakers LLSpeakerMgr::speaker_list_t speaker_list; mSpeakerMgr->getSpeakerList(&speaker_list, true); @@ -113,6 +120,7 @@ LLParticipantList::~LLParticipantList() mAvatarListDoubleClickConnection.disconnect(); mAvatarListRefreshConnection.disconnect(); mAvatarListReturnConnection.disconnect(); + mAvatarListToggleIconsConnection.disconnect(); // It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged() // See ticket EXT-3427 @@ -440,6 +448,8 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() main_menu->setItemVisible("SortByName", is_sort_visible); main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible); main_menu->setItemVisible("Moderator Options", isGroupModerator()); + main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected()); + main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected()); main_menu->arrangeAndClear(); return main_menu; |