summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeople.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpeople.cpp')
-rwxr-xr-xindra/newview/llpanelpeople.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index de4efc8612..6b86459d8f 100755
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1326,8 +1326,12 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata)
}
else if (chosen_item == "view_icons")
{
- mAllFriendList->toggleIcons();
- mOnlineFriendList->toggleIcons();
+ 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));
}
else if (chosen_item == "view_permissions")
{
@@ -1363,7 +1367,10 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata)
}
else if (chosen_item == "view_icons")
{
- mNearbyList->toggleIcons();
+ 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));
}
else if (chosen_item == "sort_distance")
{
@@ -1382,6 +1389,8 @@ 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;
}
@@ -1400,7 +1409,10 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata)
}
else if (chosen_item == "view_icons")
{
- mRecentList->toggleIcons();
+ 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));
}
}
@@ -1413,6 +1425,8 @@ 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;
}
@@ -1426,6 +1440,8 @@ 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;
}