From db5aba55b1d51f083dd61781c32c57c0b986909a Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 28 Jun 2013 13:48:44 -0700 Subject: ACME-638: Removed LLSocialList class and FBC Test tab in the People panel. --- indra/newview/CMakeLists.txt | 2 - indra/newview/llpanelpeople.cpp | 32 ----- indra/newview/llpanelpeople.h | 2 - indra/newview/llsociallist.cpp | 154 --------------------- indra/newview/llsociallist.h | 102 -------------- .../newview/skins/default/xui/en/panel_people.xml | 95 ------------- 6 files changed, 387 deletions(-) delete mode 100644 indra/newview/llsociallist.cpp delete mode 100644 indra/newview/llsociallist.h (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index a5ad2e4d4e..f593375aed 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -513,7 +513,6 @@ set(viewer_SOURCE_FILES llsky.cpp llslurl.cpp llsnapshotlivepreview.cpp - llsociallist.cpp llspatialpartition.cpp llspeakers.cpp llspeakingindicatormanager.cpp @@ -1092,7 +1091,6 @@ set(viewer_HEADER_FILES llsky.h llslurl.h llsnapshotlivepreview.h - llsociallist.h llspatialpartition.h llspeakers.h llspeakingindicatormanager.h diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 92391f0537..d3493373f6 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -72,7 +72,6 @@ #include "llviewermenu.h" // for gMenuHolder #include "llvoiceclient.h" #include "llworld.h" -#include "llsociallist.h" #include "llspeakers.h" #include "llfloaterwebcontent.h" @@ -87,7 +86,6 @@ static const std::string FRIENDS_TAB_NAME = "friends_panel"; static const std::string GROUP_TAB_NAME = "groups_panel"; static const std::string RECENT_TAB_NAME = "recent_panel"; static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars -static const std::string FBCTEST_TAB_NAME = "fbctest_panel"; static const std::string FBCTESTTWO_TAB_NAME = "fbctesttwo_panel"; static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; @@ -528,7 +526,6 @@ LLPanelPeople::LLPanelPeople() mCommitCallbackRegistrar.add("People.loginFBC", boost::bind(&LLPanelPeople::onLoginFbcButtonClicked, this)); mCommitCallbackRegistrar.add("People.requestFBC", boost::bind(&LLPanelPeople::onFacebookAppRequestClicked, this)); mCommitCallbackRegistrar.add("People.sendFBC", boost::bind(&LLPanelPeople::onFacebookAppSendClicked, this)); - mCommitCallbackRegistrar.add("People.testaddFBC", boost::bind(&LLPanelPeople::onFacebookTestAddClicked, this)); mCommitCallbackRegistrar.add("People.testaddFBCFolderView", boost::bind(&LLPanelPeople::addTestParticipant, this)); mCommitCallbackRegistrar.add("People.AddFriend", boost::bind(&LLPanelPeople::onAddFriendButtonClicked, this)); @@ -648,13 +645,6 @@ BOOL LLPanelPeople::postBuild() mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); mSuggestedFriends->setContextMenu(&LLPanelPeopleMenus::gSuggestedFriendsContextMenu); - //===Temporary ======================================================================== - - LLPanel * social_tab = getChild(FBCTEST_TAB_NAME); - mFacebookFriends = social_tab->getChild("facebook_friends"); - // Note: we use the same updater for both test lists (brute force but OK since it's temporary) - social_tab->setVisibleCallback(boost::bind(&LLPanelPeople::updateFacebookList, this, _2)); - //===Test START======================================================================== LLPanel * socialtwo_tab = getChild(FBCTESTTWO_TAB_NAME); @@ -1025,8 +1015,6 @@ LLUUID LLPanelPeople::getCurrentItemID() const if (cur_tab == BLOCKED_TAB_NAME) return LLUUID::null; // FIXME? - if (cur_tab == FBCTEST_TAB_NAME) - return LLUUID::null; if (cur_tab == FBCTESTTWO_TAB_NAME) return LLUUID::null; @@ -1054,8 +1042,6 @@ void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const mGroupList->getSelectedUUIDs(selected_uuids); else if (cur_tab == BLOCKED_TAB_NAME) selected_uuids.clear(); // FIXME? - else if (cur_tab == FBCTEST_TAB_NAME) - return; else if (cur_tab == FBCTESTTWO_TAB_NAME) return; else @@ -1695,22 +1681,4 @@ void LLPanelPeople::onFacebookAppSendClicked() { } -static LLFastTimer::DeclareTimer FTM_AVATAR_LIST_TEST("avatar list test"); - -void LLPanelPeople::onFacebookTestAddClicked() -{ - LLFastTimer _(FTM_AVATAR_LIST_TEST); - - mFacebookFriends->clear(); - - LL_INFOS("LLPanelPeople") << "start adding 300 users" << LL_ENDL; - - for(int i = 0; i < 300; ++i) - { - mFacebookFriends->addNewItem(LLUUID(), "Test", false); - } - - LL_INFOS("LLPanelPeople") << "finished adding 300 users" << LL_ENDL; -} - // EOF diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 1cd2a05e91..cbfd74a2a0 100755 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -35,7 +35,6 @@ #include "llvoiceclient.h" class LLAvatarList; -class LLAvatarListSocial; class LLAvatarName; class LLFilterEditor; class LLGroupList; @@ -123,7 +122,6 @@ private: void onLoginFbcButtonClicked(); void onFacebookAppRequestClicked(); void onFacebookAppSendClicked(); - void onFacebookTestAddClicked(); bool onFriendsViewSortMenuItemCheck(const LLSD& userdata); bool onRecentViewSortMenuItemCheck(const LLSD& userdata); diff --git a/indra/newview/llsociallist.cpp b/indra/newview/llsociallist.cpp deleted file mode 100644 index 9f827cf04f..0000000000 --- a/indra/newview/llsociallist.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/** -* @file llsociallist.cpp -* @brief Implementation of llsociallist -* @author Gilbert@lindenlab.com -* -* $LicenseInfo:firstyear=2013&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2013, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ - - -#include "llviewerprecompiledheaders.h" - -#include "llsociallist.h" - -#include "llavataractions.h" -#include "llfloaterreg.h" -#include "llavatariconctrl.h" -#include "llavatarnamecache.h" -#include "lloutputmonitorctrl.h" -#include "lltextutil.h" - -static LLDefaultChildRegistry::Register r("social_list"); - -LLSocialList::LLSocialList(const Params&p) : LLFlatListViewEx(p) -{ - -} - -LLSocialList::~LLSocialList() -{ - -} - -void LLSocialList::draw() -{ - LLFlatListView::draw(); -} - -void LLSocialList::refresh() -{ - -} - -void LLSocialList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) -{ - LLSocialListItem * item = new LLSocialListItem(); - LLAvatarName avatar_name; - bool has_avatar_name = id.notNull() && LLAvatarNameCache::get(id, &avatar_name); - - item->mAvatarId = id; - if(id.notNull()) - { - item->mIcon->setValue(id); - } - - item->setName(has_avatar_name ? name + " (" + avatar_name.getDisplayName() + ")" : name, mNameFilter); - addItem(item, id, pos); -} - -LLSocialListItem::LLSocialListItem() -{ - buildFromFile("panel_avatar_list_item.xml"); -} - -LLSocialListItem::~LLSocialListItem() -{ - -} - -BOOL LLSocialListItem::postBuild() -{ - mIcon = getChild("avatar_icon"); - mLabelTextBox = getChild("avatar_name"); - - mLastInteractionTime = getChild("last_interaction"); - mIconPermissionOnline = getChild("permission_online_icon"); - mIconPermissionMap = getChild("permission_map_icon"); - mIconPermissionEditMine = getChild("permission_edit_mine_icon"); - mIconPermissionEditTheirs = getChild("permission_edit_theirs_icon"); - mSpeakingIndicator = getChild("speaking_indicator"); - mInfoBtn = getChild("info_btn"); - mProfileBtn = getChild("profile_btn"); - - mLastInteractionTime->setVisible(false); - mIconPermissionOnline->setVisible(false); - mIconPermissionMap->setVisible(false); - mIconPermissionEditMine->setVisible(false); - mIconPermissionEditTheirs->setVisible(false); - mSpeakingIndicator->setVisible(false); - mInfoBtn->setVisible(false); - mProfileBtn->setVisible(false); - - mInfoBtn->setClickedCallback(boost::bind(&LLSocialListItem::onInfoBtnClick, this)); - mProfileBtn->setClickedCallback(boost::bind(&LLSocialListItem::onProfileBtnClick, this)); - - return TRUE; -} - -void LLSocialListItem::setName(const std::string& name, const std::string& highlight) -{ - mLabel = name; - LLTextUtil::textboxSetHighlightedVal(mLabelTextBox, mLabelTextBoxStyle, name, highlight); -} - -void LLSocialListItem::setValue(const LLSD& value) -{ - getChildView("selected_icon")->setVisible( value["selected"]); -} - -void LLSocialListItem::onMouseEnter(S32 x, S32 y, MASK mask) -{ - getChildView("hovered_icon")->setVisible( true); - mInfoBtn->setVisible(true); - mProfileBtn->setVisible(true); - - LLPanel::onMouseEnter(x, y, mask); -} - -void LLSocialListItem::onMouseLeave(S32 x, S32 y, MASK mask) -{ - getChildView("hovered_icon")->setVisible( false); - mInfoBtn->setVisible(false); - mProfileBtn->setVisible(false); - - LLPanel::onMouseLeave(x, y, mask); -} - -void LLSocialListItem::onInfoBtnClick() -{ - LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarId)); -} - -void LLSocialListItem::onProfileBtnClick() -{ - LLAvatarActions::showProfile(mAvatarId); -} diff --git a/indra/newview/llsociallist.h b/indra/newview/llsociallist.h deleted file mode 100644 index bc667fc400..0000000000 --- a/indra/newview/llsociallist.h +++ /dev/null @@ -1,102 +0,0 @@ -/** -* @file llsociallist.h -* @brief Header file for llsociallist -* @author Gilbert@lindenlab.com -* -* $LicenseInfo:firstyear=2013&license=viewerlgpl$ -* Second Life Viewer Source Code -* Copyright (C) 2013, Linden Research, Inc. -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; -* version 2.1 of the License only. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA -* $/LicenseInfo$ -*/ -#ifndef LL_LLSOCIALLIST_H -#define LL_LLSOCIALLIST_H - -#include "llflatlistview.h" -#include "llstyle.h" - - -/** - * Generic list of avatars. - * - * Updates itself when it's dirty, using optional name filter. - * To initiate update, modify the UUID list and call setDirty(). - * - * @see getIDs() - * @see setDirty() - * @see setNameFilter() - */ - -class LLAvatarIconCtrl; -class LLIconCtrl; -class LLOutputMonitorCtrl; - -class LLSocialList : public LLFlatListViewEx -{ -public: - - struct Params : public LLInitParam::Block - { - }; - - LLSocialList(const Params&p); - virtual ~LLSocialList(); - - virtual void draw(); - void refresh(); - void addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos = ADD_BOTTOM); - - - - std::string mNameFilter; -}; - -class LLSocialListItem : public LLPanel -{ - public: - LLSocialListItem(); - ~LLSocialListItem(); - - BOOL postBuild(); - void setName(const std::string& name, const std::string& highlight = LLStringUtil::null); - void setValue(const LLSD& value); - void onMouseEnter(S32 x, S32 y, MASK mask); - void onMouseLeave(S32 x, S32 y, MASK mask); - void onInfoBtnClick(); - void onProfileBtnClick(); - - LLUUID mAvatarId; - - LLTextBox * mLabelTextBox; - std::string mLabel; - LLStyle::Params mLabelTextBoxStyle; - - - LLAvatarIconCtrl * mIcon; - LLTextBox * mLastInteractionTime; - LLIconCtrl * mIconPermissionOnline; - LLIconCtrl * mIconPermissionMap; - LLIconCtrl * mIconPermissionEditMine; - LLIconCtrl * mIconPermissionEditTheirs; - LLOutputMonitorCtrl * mSpeakingIndicator; - LLButton * mInfoBtn; - LLButton * mProfileBtn; -}; - - -#endif // LL_LLSOCIALLIST_H diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 451095c7d8..76124148a0 100755 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -651,101 +651,6 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M right="-1" /> - - - - - - - - - - - - - - -