From 0c4ec8642471bacb4bf9d61283aa28af8015985a Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 19 Nov 2015 22:17:37 +0200 Subject: MAINT-5297 Backed out changeset: dd9e3cbf10e5 --- indra/newview/app_settings/settings.xml | 11 --------- indra/newview/llavatarlist.cpp | 14 +++++------- indra/newview/llavatarlist.h | 2 +- indra/newview/llconversationview.cpp | 4 ++-- indra/newview/llfloaterimcontainer.cpp | 5 ++--- indra/newview/llpanelpeople.cpp | 24 ++++---------------- .../default/xui/en/menu_people_friends_view.xml | 4 ++-- .../default/xui/en/menu_people_nearby_view.xml | 4 ++-- .../default/xui/en/menu_people_recent_view.xml | 4 ++-- .../default/xui/en/panel_preferences_setup.xml | 26 ---------------------- 10 files changed, 20 insertions(+), 78 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e04d03c832..73f50c5ce2 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11040,17 +11040,6 @@ Value 1 - GlobalShowIconsOverride - - Comment - Show/hide people icons in any list. This option should be set back to 0 when icons are enabled locally for the lists - Persist - 1 - Type - Boolean - Value - 0 - FriendsSortOrder Comment diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index c7fa375ada..8846d1317d 100755 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -63,18 +63,16 @@ bool LLAvatarList::contains(const LLUUID& id) return std::find(ids.begin(), ids.end(), id) != ids.end(); } -void LLAvatarList::setIconsVisible(bool visible) +void LLAvatarList::toggleIcons() { - if (visible == mShowIcons) // nothing to be done here. - return; - // Save the new value for new items to use. - mShowIcons = visible; - + mShowIcons = !mShowIcons; + gSavedSettings.setBOOL(mIconParamName, mShowIcons); + // Show/hide icons for all existing items. std::vector items; getItems(items); - for (std::vector::const_iterator it = items.begin(); it != items.end(); it++) + for( std::vector::const_iterator it = items.begin(); it != items.end(); it++) { static_cast(*it)->setAvatarIconVisible(mShowIcons); } @@ -189,8 +187,6 @@ void LLAvatarList::draw() updateAvatarNames(); } - setIconsVisible(gSavedSettings.getBOOL(mIconParamName) && !gSavedSettings.getBOOL("GlobalShowIconsOverride")); - if (mDirty) refresh(); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 159ff991e6..3542577ae3 100755 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -76,7 +76,7 @@ public: void setSessionID(const LLUUID& session_id) { mSessionID = session_id; } const LLUUID& getSessionID() { return mSessionID; } - void setIconsVisible(bool visible); + void toggleIcons(); void setSpeakingIndicatorsVisible(bool visible); void showPermissions(bool visible); void sortByName(); diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 3a6e4c4dfe..924a8d7206 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -503,7 +503,7 @@ void LLConversationViewSession::refresh() } } - setIconsVisible(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride")); + setIconsVisible(gSavedSettings.getBOOL("ChatShowIcons")); requestArrange(); // Do the regular upstream refresh @@ -572,7 +572,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti BOOL LLConversationViewParticipant::postBuild() { mAvatarIcon = getChild("avatar_icon"); - mAvatarIcon->setVisible(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride")); + mAvatarIcon->setVisible(gSavedSettings.getBOOL("ChatShowIcons")); mInfoBtn = getChild("info_btn"); mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 91a0af3e8d..fc87e5dc5a 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -926,8 +926,7 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) } if ("view_icons" == command) { - gSavedSettings.setBOOL("ChatShowIcons", !(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL("ChatShowIcons") && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); + gSavedSettings.setBOOL("ChatShowIcons", !gSavedSettings.getBOOL("ChatShowIcons")); } if ("chat_preferences" == command) { @@ -981,7 +980,7 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) } if ("view_icons" == command) { - return gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); + return gSavedSettings.getBOOL("ChatShowIcons"); } if ("Translating.Enabled" == command) { diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index e28f37ccb0..73b928f014 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1331,12 +1331,8 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) } else if (chosen_item == "view_icons") { - std::string param = mAllFriendList->getIconParamName(); - gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL(mOnlineFriendList->getIconParamName(), gSavedSettings.getBOOL(param)); - mAllFriendList->setIconsVisible(gSavedSettings.getBOOL(param)); - mOnlineFriendList->setIconsVisible(gSavedSettings.getBOOL(param)); + mAllFriendList->toggleIcons(); + mOnlineFriendList->toggleIcons(); } else if (chosen_item == "view_permissions") { @@ -1372,10 +1368,7 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) } else if (chosen_item == "view_icons") { - std::string param = mNearbyList->getIconParamName(); - gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - mNearbyList->setIconsVisible(gSavedSettings.getBOOL(param)); + mNearbyList->toggleIcons(); } else if (chosen_item == "sort_distance") { @@ -1394,8 +1387,6 @@ bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata) return sort_order == E_SORT_BY_NAME; if (item == "sort_distance") return sort_order == E_SORT_BY_DISTANCE; - if (item == "view_icons") - return gSavedSettings.getBOOL(mNearbyList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); return false; } @@ -1414,10 +1405,7 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata) } else if (chosen_item == "view_icons") { - std::string param = mRecentList->getIconParamName(); - gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - mRecentList->setIconsVisible(gSavedSettings.getBOOL(param)); + mRecentList->toggleIcons(); } } @@ -1430,8 +1418,6 @@ bool LLPanelPeople::onFriendsViewSortMenuItemCheck(const LLSD& userdata) return sort_order == E_SORT_BY_NAME; if (item == "sort_status") return sort_order == E_SORT_BY_STATUS; - if (item == "view_icons") - return gSavedSettings.getBOOL(mAllFriendList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); return false; } @@ -1445,8 +1431,6 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata) return sort_order == E_SORT_BY_MOST_RECENT; if (item == "sort_name") return sort_order == E_SORT_BY_NAME; - if (item == "view_icons") - return gSavedSettings.getBOOL(mRecentList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); return false; } diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml index 02c6cfc006..8790fde7c5 100755 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view.xml @@ -29,8 +29,8 @@ function="People.Friends.ViewSort.Action" parameter="view_icons" /> + function="CheckControl" + parameter="FriendsListShowIcons" /> + function="CheckControl" + parameter="NearbyListShowIcons" /> + function="CheckControl" + parameter="RecentListShowIcons" /> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index a8be517f3c..b201e071ef 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -313,30 +313,4 @@ - - People Icons: - - -- cgit v1.2.3