Merge
|
|
@ -41,6 +41,7 @@ Collapsable_Nearbychat LGPL
|
|||
InvFolderType_Icons LGPL
|
||||
Hippos! LGPL
|
||||
V1_MouseCursors LGPL/Creative Commons Attribution-Share Alike 3.0
|
||||
V1_Icons Creative Commons Attribution-Share Alike 3.0
|
||||
V1_Icons Creative Commons Attribution-Share Alike 3.0
|
||||
AFK_ExtraControls LGPL
|
||||
IgnoreFinishAnimation BSD/PD
|
||||
IgnoreFinishAnimation BSD/PD
|
||||
V1_Contacts LGPL
|
||||
|
|
@ -70,6 +70,7 @@ include_directories(
|
|||
set(viewer_SOURCE_FILES
|
||||
chatbar_as_cmdline.cpp
|
||||
kcwlinterface.cpp
|
||||
fscontactsfloater.cpp
|
||||
llagent.cpp
|
||||
llagentaccess.cpp
|
||||
llagentcamera.cpp
|
||||
|
|
@ -613,6 +614,7 @@ set(viewer_HEADER_FILES
|
|||
ViewerInstall.cmake
|
||||
chatbar_as_cmdline.h
|
||||
kcwlinterface.h
|
||||
fscontactsfloater.h
|
||||
llagent.h
|
||||
llagentaccess.h
|
||||
llagentcamera.h
|
||||
|
|
|
|||
|
|
@ -0,0 +1,351 @@
|
|||
/**
|
||||
* @file
|
||||
* @brief
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=fsviewerlgpl$
|
||||
* Phoenix Firestorm Viewer Source Code
|
||||
* Copyright (C) 2011, The Phoenix Viewer Project, 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
|
||||
*
|
||||
* The Phoenix Viewer Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "fscontactsfloater.h"
|
||||
|
||||
// libs
|
||||
#include "llavatarname.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llfloater.h"
|
||||
#include "lltabcontainer.h"
|
||||
|
||||
#include "llavataractions.h"
|
||||
#include "llavatarlist.h"
|
||||
#include "llavatarlistitem.h"
|
||||
#include "llcallingcard.h" // for LLAvatarTracker
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfriendcard.h"
|
||||
#include "llgroupactions.h"
|
||||
#include "llgrouplist.h"
|
||||
#include "llsidetray.h"
|
||||
|
||||
static const std::string FRIENDS_TAB_NAME = "friends_panel";
|
||||
static const std::string GROUP_TAB_NAME = "groups_panel";
|
||||
|
||||
/** Compares avatar items by online status, then by name */
|
||||
class LLAvatarItemStatusComparator : public LLAvatarItemComparator
|
||||
{
|
||||
public:
|
||||
LLAvatarItemStatusComparator() {};
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @return true if item1 < item2, false otherwise
|
||||
*/
|
||||
virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const
|
||||
{
|
||||
LLAvatarTracker& at = LLAvatarTracker::instance();
|
||||
bool online1 = at.isBuddyOnline(item1->getAvatarId());
|
||||
bool online2 = at.isBuddyOnline(item2->getAvatarId());
|
||||
|
||||
if (online1 == online2)
|
||||
{
|
||||
std::string name1 = item1->getAvatarName();
|
||||
std::string name2 = item2->getAvatarName();
|
||||
|
||||
LLStringUtil::toUpper(name1);
|
||||
LLStringUtil::toUpper(name2);
|
||||
|
||||
return name1 < name2;
|
||||
}
|
||||
|
||||
return online1 > online2;
|
||||
}
|
||||
};
|
||||
|
||||
static const LLAvatarItemStatusComparator STATUS_COMPARATOR;
|
||||
|
||||
|
||||
//
|
||||
// FSFloaterContacts
|
||||
//
|
||||
|
||||
FSFloaterContacts::FSFloaterContacts(const LLSD& seed)
|
||||
: LLFloater(seed),
|
||||
mTabContainer(NULL),
|
||||
mFriendList(NULL),
|
||||
mGroupList(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
FSFloaterContacts::~FSFloaterContacts()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL FSFloaterContacts::postBuild()
|
||||
{
|
||||
mTabContainer = getChild<LLTabContainer>("friends_and_groups");
|
||||
|
||||
mFriendsTab = getChild<LLPanel>(FRIENDS_TAB_NAME);
|
||||
mFriendList = mFriendsTab->getChild<LLAvatarList>("avatars_all");
|
||||
mFriendList->setNoItemsCommentText(getString("no_friends"));
|
||||
mFriendList->setShowIcons("FriendsListShowIcons");
|
||||
mFriendList->showPermissions(TRUE);
|
||||
mFriendList->setComparator(&STATUS_COMPARATOR);
|
||||
mFriendList->sort();
|
||||
|
||||
mFriendList->setItemDoubleClickCallback(boost::bind(&FSFloaterContacts::onAvatarListDoubleClicked, this, _1));
|
||||
mFriendList->setReturnCallback(boost::bind(&FSFloaterContacts::onImButtonClicked, this));
|
||||
|
||||
mFriendsTab->childSetAction("im_btn", boost::bind(&FSFloaterContacts::onImButtonClicked, this));
|
||||
mFriendsTab->childSetAction("profile_btn", boost::bind(&FSFloaterContacts::onViewProfileButtonClicked, this));
|
||||
mFriendsTab->childSetAction("offer_teleport_btn", boost::bind(&FSFloaterContacts::onTeleportButtonClicked, this));
|
||||
mFriendsTab->childSetAction("pay_btn", boost::bind(&FSFloaterContacts::onPayButtonClicked, this));
|
||||
|
||||
mFriendsTab->childSetAction("remove_btn", boost::bind(&FSFloaterContacts::onDeleteFriendButtonClicked, this));
|
||||
mFriendsTab->childSetAction("add_btn", boost::bind(&FSFloaterContacts::onAddFriendWizButtonClicked, this));
|
||||
|
||||
mGroupsTab = getChild<LLPanel>(GROUP_TAB_NAME);
|
||||
mGroupList = mGroupsTab->getChild<LLGroupList>("group_list");
|
||||
mGroupList->setNoItemsMsg(getString("no_groups_msg"));
|
||||
mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg"));
|
||||
|
||||
mGroupList->setDoubleClickCallback(boost::bind(&FSFloaterContacts::onGroupChatButtonClicked, this));
|
||||
// mGroupList->setCommitCallback(boost::bind(&FSFloaterContacts::updateButtons, this));
|
||||
mGroupList->setReturnCallback(boost::bind(&FSFloaterContacts::onGroupChatButtonClicked, this));
|
||||
|
||||
|
||||
mGroupsTab->childSetAction("chat_btn", boost::bind(&FSFloaterContacts::onGroupChatButtonClicked, this));
|
||||
mGroupsTab->childSetAction("info_btn", boost::bind(&FSFloaterContacts::onGroupInfoButtonClicked, this));
|
||||
mGroupsTab->childSetAction("activate_btn", boost::bind(&FSFloaterContacts::onGroupActivateButtonClicked, this));
|
||||
mGroupsTab->childSetAction("leave_btn", boost::bind(&FSFloaterContacts::onGroupLeaveButtonClicked, this));
|
||||
mGroupsTab->childSetAction("create_btn", boost::bind(&FSFloaterContacts::onGroupCreateButtonClicked, this));
|
||||
mGroupsTab->childSetAction("search_btn", boost::bind(&FSFloaterContacts::onGroupSearchButtonClicked, this));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onOpen(const LLSD& key)
|
||||
{
|
||||
if (key.asString() == "friends")
|
||||
{
|
||||
childShowTab("friends_and_groups", "friends_panel");
|
||||
}
|
||||
else if (key.asString() == "groups")
|
||||
{
|
||||
childShowTab("friends_and_groups", "groups_panel");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Friend actions
|
||||
//
|
||||
|
||||
void FSFloaterContacts::onAvatarListDoubleClicked(LLUICtrl* ctrl)
|
||||
{
|
||||
LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
|
||||
if(!item)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLUUID clicked_id = item->getAvatarId();
|
||||
|
||||
#if 0 // SJB: Useful for testing, but not currently functional or to spec
|
||||
LLAvatarActions::showProfile(clicked_id);
|
||||
#else // spec says open IM window
|
||||
LLAvatarActions::startIM(clicked_id);
|
||||
#endif
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onImButtonClicked()
|
||||
{
|
||||
uuid_vec_t selected_uuids;
|
||||
getCurrentItemIDs(selected_uuids);
|
||||
if ( selected_uuids.size() == 1 )
|
||||
{
|
||||
// if selected only one person then start up IM
|
||||
LLAvatarActions::startIM(selected_uuids.at(0));
|
||||
}
|
||||
else if ( selected_uuids.size() > 1 )
|
||||
{
|
||||
// for multiple selection start up friends conference
|
||||
LLAvatarActions::startConference(selected_uuids);
|
||||
}
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onViewProfileButtonClicked()
|
||||
{
|
||||
LLUUID id = getCurrentItemID();
|
||||
LLAvatarActions::showProfile(id);
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onTeleportButtonClicked()
|
||||
{
|
||||
uuid_vec_t selected_uuids;
|
||||
getCurrentItemIDs(selected_uuids);
|
||||
LLAvatarActions::offerTeleport(selected_uuids);
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onPayButtonClicked()
|
||||
{
|
||||
LLUUID id = getCurrentItemID();
|
||||
if (id.notNull())
|
||||
LLAvatarActions::pay(id);
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onDeleteFriendButtonClicked()
|
||||
{
|
||||
uuid_vec_t selected_uuids;
|
||||
getCurrentItemIDs(selected_uuids);
|
||||
|
||||
if (selected_uuids.size() == 1)
|
||||
{
|
||||
LLAvatarActions::removeFriendDialog( selected_uuids.front() );
|
||||
}
|
||||
else if (selected_uuids.size() > 1)
|
||||
{
|
||||
LLAvatarActions::removeFriendsDialog( selected_uuids );
|
||||
}
|
||||
}
|
||||
|
||||
bool FSFloaterContacts::isItemsFreeOfFriends(const uuid_vec_t& uuids)
|
||||
{
|
||||
const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
|
||||
for ( uuid_vec_t::const_iterator
|
||||
id = uuids.begin(),
|
||||
id_end = uuids.end();
|
||||
id != id_end; ++id )
|
||||
{
|
||||
if (av_tracker.isBuddy (*id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onAddFriendWizButtonClicked()
|
||||
{
|
||||
// Show add friend wizard.
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&FSFloaterContacts::onAvatarPicked, _1, _2), FALSE, TRUE);
|
||||
// Need to disable 'ok' button when friend occurs in selection
|
||||
if (picker) picker->setOkBtnEnableCb(boost::bind(&FSFloaterContacts::isItemsFreeOfFriends, this, _1));
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
if (root_floater)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Group actions
|
||||
//
|
||||
|
||||
void FSFloaterContacts::onGroupChatButtonClicked()
|
||||
{
|
||||
LLUUID group_id = getCurrentItemID();
|
||||
if (group_id.notNull())
|
||||
LLGroupActions::startIM(group_id);
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onGroupInfoButtonClicked()
|
||||
{
|
||||
LLGroupActions::show(getCurrentItemID());
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onGroupActivateButtonClicked()
|
||||
{
|
||||
LLGroupActions::activate(mGroupList->getSelectedUUID());
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onGroupLeaveButtonClicked()
|
||||
{
|
||||
LLUUID group_id = getCurrentItemID();
|
||||
if (group_id.notNull())
|
||||
LLGroupActions::leave(group_id);
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onGroupCreateButtonClicked()
|
||||
{
|
||||
LLGroupActions::createGroup();
|
||||
}
|
||||
|
||||
void FSFloaterContacts::onGroupSearchButtonClicked()
|
||||
{
|
||||
LLGroupActions::search();
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::string FSFloaterContacts::getActiveTabName() const
|
||||
{
|
||||
return mTabContainer->getCurrentPanel()->getName();
|
||||
}
|
||||
|
||||
LLUUID FSFloaterContacts::getCurrentItemID() const
|
||||
{
|
||||
std::string cur_tab = getActiveTabName();
|
||||
|
||||
if (cur_tab == FRIENDS_TAB_NAME)
|
||||
return mFriendList->getSelectedUUID();
|
||||
|
||||
if (cur_tab == GROUP_TAB_NAME)
|
||||
return mGroupList->getSelectedUUID();
|
||||
|
||||
llassert(0 && "unknown tab selected");
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
void FSFloaterContacts::getCurrentItemIDs(uuid_vec_t& selected_uuids) const
|
||||
{
|
||||
std::string cur_tab = getActiveTabName();
|
||||
|
||||
if (cur_tab == FRIENDS_TAB_NAME)
|
||||
mFriendList->getSelectedUUIDs(selected_uuids);
|
||||
else if (cur_tab == GROUP_TAB_NAME)
|
||||
mGroupList->getSelectedUUIDs(selected_uuids);
|
||||
else
|
||||
llassert(0 && "unknown tab selected");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// static
|
||||
void FSFloaterContacts::onAvatarPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
|
||||
{
|
||||
if (!names.empty() && !ids.empty())
|
||||
LLAvatarActions::requestFriendshipDialog(ids[0], names[0].getCompleteName());
|
||||
}
|
||||
|
||||
|
||||
//static
|
||||
FSFloaterContacts* FSFloaterContacts::findInstance()
|
||||
{
|
||||
return LLFloaterReg::findTypedInstance<FSFloaterContacts>("imcontacts");
|
||||
}
|
||||
|
||||
FSFloaterContacts* FSFloaterContacts::getInstance()
|
||||
{
|
||||
return LLFloaterReg::getTypedInstance<FSFloaterContacts>("imcontacts");
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* @file fscontactsfloater.h
|
||||
* @brief
|
||||
*
|
||||
* $LicenseInfo:firstyear=2011&license=fsviewerlgpl$
|
||||
* Phoenix Firestorm Viewer Source Code
|
||||
* Copyright (C) 2011, The Phoenix Viewer Project, 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
|
||||
*
|
||||
* The Phoenix Viewer Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
#ifndef LL_FSCONTACTSFLOATER_H
|
||||
#define LL_FSCONTACTSFLOATER_H
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLAvatarList;
|
||||
class LLAvatarName;
|
||||
class LLGroupList;
|
||||
class LLPanel;
|
||||
class LLTabContainer;
|
||||
|
||||
class FSFloaterContacts : public LLFloater
|
||||
{
|
||||
public:
|
||||
FSFloaterContacts(const LLSD& seed);
|
||||
virtual ~FSFloaterContacts();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
||||
static FSFloaterContacts* getInstance();
|
||||
static FSFloaterContacts* findInstance();
|
||||
|
||||
LLPanel* mFriendsTab;
|
||||
LLAvatarList* mFriendList;
|
||||
LLPanel* mGroupsTab;
|
||||
LLGroupList* mGroupList;
|
||||
|
||||
private:
|
||||
std::string getActiveTabName() const;
|
||||
LLUUID getCurrentItemID() const;
|
||||
void getCurrentItemIDs(uuid_vec_t& selected_uuids) const;
|
||||
void onAvatarListDoubleClicked(LLUICtrl* ctrl);
|
||||
|
||||
bool isItemsFreeOfFriends(const uuid_vec_t& uuids);
|
||||
|
||||
// misc callbacks
|
||||
static void onAvatarPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
|
||||
|
||||
// friend buttons
|
||||
void onViewProfileButtonClicked();
|
||||
void onImButtonClicked();
|
||||
void onTeleportButtonClicked();
|
||||
void onPayButtonClicked();
|
||||
void onDeleteFriendButtonClicked();
|
||||
void onAddFriendWizButtonClicked();
|
||||
|
||||
// group buttons
|
||||
void onGroupChatButtonClicked();
|
||||
void onGroupInfoButtonClicked();
|
||||
void onGroupActivateButtonClicked();
|
||||
void onGroupLeaveButtonClicked();
|
||||
void onGroupCreateButtonClicked();
|
||||
void onGroupSearchButtonClicked();
|
||||
|
||||
LLTabContainer* mTabContainer;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // LL_FSCONTACTSFLOATER_H
|
||||
|
|
@ -293,7 +293,8 @@ void LLAvatarList::refresh()
|
|||
// *NOTE: If you change the UI to show a different string,
|
||||
// be sure to change the filter code below.
|
||||
addNewItem(buddy_id,
|
||||
av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName,
|
||||
//av_name.mDisplayName.empty() ? waiting_str : av_name.mDisplayName,
|
||||
av_name.getCompleteName(),
|
||||
LLAvatarTracker::instance().isBuddyOnline(buddy_id));
|
||||
modified = true;
|
||||
nadded++;
|
||||
|
|
@ -319,7 +320,7 @@ void LLAvatarList::refresh()
|
|||
const LLUUID& buddy_id = it->asUUID();
|
||||
LLAvatarName av_name;
|
||||
have_names &= LLAvatarNameCache::get(buddy_id, &av_name);
|
||||
if (!findInsensitive(av_name.mDisplayName, mNameFilter))
|
||||
if (!findInsensitive(av_name.getCompleteName(), mNameFilter))
|
||||
{
|
||||
removeItemByUUID(buddy_id);
|
||||
modified = true;
|
||||
|
|
|
|||
|
|
@ -415,7 +415,8 @@ void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
|
|||
// setAvatarToolTip(av_name.mUsername);
|
||||
// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
|
||||
bool fRlvFilter = (mRlvCheckShowNames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
|
||||
setAvatarName( (!fRlvFilter) ? av_name.mDisplayName : RlvStrings::getAnonym(av_name) );
|
||||
//setAvatarName( (!fRlvFilter) ? av_name.mDisplayName : RlvStrings::getAnonym(av_name) );
|
||||
setAvatarName( (!fRlvFilter) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
|
||||
setAvatarToolTip( (!fRlvFilter) ? av_name.mUsername : RlvStrings::getAnonym(av_name) );
|
||||
// TODO-RLVa: bit of a hack putting this here. Maybe find a better way?
|
||||
mAvatarIcon->setDrawTooltip(!fRlvFilter);
|
||||
|
|
|
|||
|
|
@ -530,7 +530,10 @@ void LLAvatarTracker::notifyParticularFriendObservers(const LLUUID& buddy_id)
|
|||
observer_set_t& obs = obs_it->second;
|
||||
for (observer_set_t::iterator ob_it = obs.begin(); ob_it != obs.end(); ob_it++)
|
||||
{
|
||||
(*ob_it)->changed(mModifyMask);
|
||||
if (*ob_it)
|
||||
(*ob_it)->changed(mModifyMask);
|
||||
else
|
||||
llwarns << "Invalid observer" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "lltransientfloatermgr.h"
|
||||
|
||||
#include "llnearbychat.h"
|
||||
#include "fscontactsfloater.h"
|
||||
#include "llfloater.h"
|
||||
|
||||
//
|
||||
|
|
@ -55,6 +56,9 @@ LLIMFloaterContainer::~LLIMFloaterContainer()
|
|||
|
||||
BOOL LLIMFloaterContainer::postBuild()
|
||||
{
|
||||
|
||||
addFloater(FSFloaterContacts::getInstance(), TRUE);
|
||||
|
||||
LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1));
|
||||
// Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button
|
||||
// mTabContainer will be initialized in LLMultiFloater::addChild()
|
||||
|
|
@ -100,6 +104,19 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
|
|||
openFloater(floaterp->getKey());
|
||||
return;
|
||||
}
|
||||
|
||||
if (floaterp->getName() == "imcontacts")
|
||||
{
|
||||
S32 num_locked_tabs = mTabContainer->getNumLockedTabs();
|
||||
mTabContainer->unlockTabs();
|
||||
// add contacts window as first tab
|
||||
LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START);
|
||||
// make sure first two tabs are now locked
|
||||
mTabContainer->lockTabs(num_locked_tabs + 1);
|
||||
//gSavedSettings.setBOOL("ContactsTornOff", FALSE);
|
||||
floaterp->setCanClose(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@
|
|||
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
#include "fscontactsfloater.h"
|
||||
|
||||
#define FRIEND_LIST_UPDATE_TIMEOUT 0.5
|
||||
#define NEARBY_LIST_UPDATE_INTERVAL 1
|
||||
|
|
@ -683,6 +684,9 @@ BOOL LLPanelPeople::postBuild()
|
|||
mOnlineFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2));
|
||||
mAllFriendList->setRefreshCompleteCallback(boost::bind(&LLPanelPeople::onFriendListRefreshComplete, this, _1, _2));
|
||||
|
||||
FSFloaterContacts* fs_contacts = FSFloaterContacts::getInstance();
|
||||
fs_contacts->mFriendsTab->setVisibleCallback(boost::bind(&Updater::setActive, mFriendListUpdater, _2));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -721,6 +725,8 @@ void LLPanelPeople::updateFriendList()
|
|||
if (!mOnlineFriendList || !mAllFriendList)
|
||||
return;
|
||||
|
||||
static FSFloaterContacts* fs_contacts = FSFloaterContacts::getInstance();
|
||||
|
||||
// get all buddies we know about
|
||||
const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
|
||||
LLAvatarTracker::buddy_map_t all_buddies;
|
||||
|
|
@ -741,6 +747,12 @@ void LLPanelPeople::updateFriendList()
|
|||
{
|
||||
lldebugs << "Friends Cards were found, count: " << listMap.begin()->second.size() << llendl;
|
||||
all_friendsp = listMap.begin()->second;
|
||||
if (fs_contacts->mFriendList)
|
||||
{
|
||||
uuid_vec_t& contact_friendsp = fs_contacts->mFriendList->getIDs();
|
||||
contact_friendsp.clear();
|
||||
contact_friendsp = listMap.begin()->second;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -762,6 +774,8 @@ void LLPanelPeople::updateFriendList()
|
|||
*/
|
||||
mOnlineFriendList->setDirty(true, !mOnlineFriendList->filterHasMatches());// do force update if list do NOT have items
|
||||
mAllFriendList->setDirty(true, !mAllFriendList->filterHasMatches());
|
||||
if (fs_contacts->mFriendList)
|
||||
fs_contacts->mFriendList->setDirty(true, !fs_contacts->mFriendList->filterHasMatches());
|
||||
//update trash and other buttons according to a selected item
|
||||
updateButtons();
|
||||
showFriendsAccordionsIfNeeded();
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ class LLFilterEditor;
|
|||
class LLGroupList;
|
||||
class LLTabContainer;
|
||||
class LLMenuButton;
|
||||
class LLMenuGL;
|
||||
|
||||
class LLPanelPeople
|
||||
: public LLPanel
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@
|
|||
// [RLVa:KB] - Checked: 2010-03-11
|
||||
#include "rlvfloaters.h"
|
||||
// [/RLVa:KB]
|
||||
#include "fscontactsfloater.h"
|
||||
|
||||
void LLViewerFloaterReg::registerFloaters()
|
||||
{
|
||||
|
|
@ -175,6 +176,7 @@ void LLViewerFloaterReg::registerFloaters()
|
|||
LLFloaterReg::add("help_browser", "floater_help_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHelpBrowser>);
|
||||
LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);
|
||||
|
||||
LLFloaterReg::add("imcontacts", "fs_floater_contacts.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<FSFloaterContacts>);
|
||||
LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>);
|
||||
LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>);
|
||||
LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>);
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 812 B |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
|
@ -391,6 +391,14 @@ with the same filename but different name
|
|||
<texture name="Pause_Over" file_name="icons/Pause_Over.png" preload="false" />
|
||||
<texture name="Pause_Press" file_name="icons/Pause_Press.png" preload="false" />
|
||||
|
||||
<texture name="Contacts_Online_Status_Button" file_name="legacy/ff_online_status_button.tga" />
|
||||
<texture name="Permission_Visible_Online_Mine_Button" file_name="legacy/ff_visible_online_button.tga" />
|
||||
<texture name="Permission_Visible_Online_Theirs_Button" file_name="legacy/ff_visible_online_button_theirs.tga" />
|
||||
<texture name="Permission_Visible_Map_Mine_Button" file_name="legacy/ff_visible_map_button.tga" />
|
||||
<texture name="Permission_Visible_Map_Theirs_Button" file_name="legacy/ff_visible_map_button_theirs.tga" />
|
||||
<texture name="Permission_Edit_Objects_Mine_Button" file_name="legacy/ff_edit_mine_button.tga" />
|
||||
<texture name="Permission_Edit_Objects_Theirs_Button" file_name="legacy/ff_edit_theirs_button.tga" />
|
||||
|
||||
<texture name="Permission_Visible_Online" file_name="icons/see_me_online.png" preload="false" />
|
||||
<texture name="Permission_Visible_Map" file_name="icons/see_on_map.png" preload="false" />
|
||||
<texture name="Permission_Edit_Objects_Mine" file_name="icons/edit_mine.png" preload="false" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater
|
||||
can_close="false"
|
||||
can_drag_on_left="false"
|
||||
can_minimize="false"
|
||||
can_resize="true"
|
||||
can_tear_off="true"
|
||||
height="390"
|
||||
name="imcontacts"
|
||||
save_rect="true"
|
||||
save_visibility="true"
|
||||
single_instance="true"
|
||||
title="CONTACTS"
|
||||
width="395">
|
||||
<string
|
||||
name="no_friends"
|
||||
value="No friends" />
|
||||
<string
|
||||
name="no_filtered_groups_msg"
|
||||
value="Didn't find what you're looking for? Try [secondlife:///app/search/groups/[SEARCH_TERM] Search]." />
|
||||
<string
|
||||
name="no_groups_msg"
|
||||
value="Looking for Groups to join? Try [secondlife:///app/search/groups Search]." />
|
||||
<tab_container
|
||||
follows="all"
|
||||
height="390"
|
||||
layout="topleft"
|
||||
left="4"
|
||||
name="friends_and_groups"
|
||||
tab_position="top"
|
||||
tab_width="80"
|
||||
tab_max_width = "80"
|
||||
tab_height="20"
|
||||
use_custom_icon_ctrl="false"
|
||||
tab_icon_ctrl_pad="2"
|
||||
halign="left"
|
||||
use_ellipses="true"
|
||||
top="0"
|
||||
width="393">
|
||||
<first_tab
|
||||
tab_bottom_image_flash="Toolbar_Left_Flash"/>
|
||||
<middle_tab
|
||||
tab_bottom_image_flash="Toolbar_Middle_Flash"/>
|
||||
<last_tab
|
||||
tab_bottom_image_flash="Toolbar_Right_Flash"/>
|
||||
|
||||
<panel
|
||||
bottom="0"
|
||||
filename="fs_panel_contacts_friends.xml"
|
||||
label="Friends"
|
||||
left="0"
|
||||
right="-1"
|
||||
layout="topleft"
|
||||
name="friends_panel" />
|
||||
|
||||
<panel
|
||||
bottom="0"
|
||||
filename="fs_panel_contacts_groups.xml"
|
||||
label="Groups"
|
||||
left="0"
|
||||
right="-1"
|
||||
layout="topleft"
|
||||
name="groups_panel"/>
|
||||
|
||||
</tab_container>
|
||||
</floater>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
bottom="-371"
|
||||
height="300"
|
||||
left="280"
|
||||
mouse_opaque="true"
|
||||
name="friends"
|
||||
width="350">
|
||||
<avatar_list
|
||||
allow_select="true"
|
||||
bottom="10"
|
||||
follows="left|top|right|bottom"
|
||||
left="10"
|
||||
multi_select="true"
|
||||
name="avatars_all"
|
||||
show_permissions_granted="true"
|
||||
top="-10"
|
||||
width="240" />
|
||||
<button
|
||||
top="-10"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="IM/Call"
|
||||
right="-10"
|
||||
name="im_btn"
|
||||
tool_tip="Open Instant Message session"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Profile"
|
||||
left_delta="0"
|
||||
name="profile_btn"
|
||||
tool_tip="Show picture, groups, and other information"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Teleport..."
|
||||
left_delta="0"
|
||||
name="offer_teleport_btn"
|
||||
tool_tip="Offer this friend a teleport to your current location"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Pay..."
|
||||
left_delta="0"
|
||||
name="pay_btn"
|
||||
tool_tip="Give Linden dollars (L$) to this friend"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Remove..."
|
||||
left_delta="0"
|
||||
name="remove_btn"
|
||||
tool_tip="Remove this person from your friends list"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Add..."
|
||||
left_delta="0"
|
||||
name="add_btn"
|
||||
tool_tip="Offer friendship to a resident"
|
||||
width="80" />
|
||||
</panel>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<panel
|
||||
bottom="-371"
|
||||
height="300"
|
||||
left="280"
|
||||
mouse_opaque="true"
|
||||
name="groups"
|
||||
width="350">
|
||||
<group_list
|
||||
allow_select="true"
|
||||
bottom="10"
|
||||
follows="left|top|right|bottom"
|
||||
left="10"
|
||||
name="group_list"
|
||||
top="-10"
|
||||
width="240" />
|
||||
<button
|
||||
top="-10"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="IM/Call"
|
||||
right="-10"
|
||||
name="chat_btn"
|
||||
tool_tip="Open Instant Message session"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Info"
|
||||
name="info_btn"
|
||||
width="80" />
|
||||
<!--<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Titles..."
|
||||
name="titles_btn"
|
||||
width="80" />-->
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Activate"
|
||||
name="activate_btn"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Leave"
|
||||
name="leave_btn"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-35"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Create..."
|
||||
name="create_btn"
|
||||
width="80" />
|
||||
<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
height="22"
|
||||
label="Search..."
|
||||
name="search_btn"
|
||||
width="80" />
|
||||
<!--<button
|
||||
bottom_delta="-25"
|
||||
follows="top|right"
|
||||
font="SansSerif"
|
||||
height="22"
|
||||
label="Invite..."
|
||||
name="invite_btn"
|
||||
width="80" />-->
|
||||
</panel>
|
||||
|
|
@ -92,4 +92,11 @@
|
|||
<texture name="Parcel_Voice_Light" file_name="legacy/status_voice.png" />
|
||||
<texture name="Parcel_VoiceNo_Light" file_name="legacy/status_no_voice.png" />
|
||||
|
||||
<texture name="Contacts_Online_Status_Button" file_name="legacy/ff_online_status_button.tga" />
|
||||
<texture name="Permission_Visible_Online_Mine_Button" file_name="legacy/ff_visible_online_button.tga" />
|
||||
<texture name="Permission_Visible_Online_Theirs_Button" file_name="legacy/ff_visible_online_button_theirs.tga" />
|
||||
<texture name="Permission_Visible_Map_Mine_Button" file_name="legacy/ff_visible_map_button.tga" />
|
||||
<texture name="Permission_Visible_Map_Theirs_Button" file_name="legacy/ff_visible_map_button_theirs.tga" />
|
||||
<texture name="Permission_Edit_Objects_Mine_Button" file_name="legacy/ff_edit_mine_button.tga" />
|
||||
<texture name="Permission_Edit_Objects_Theirs_Button" file_name="legacy/ff_edit_theirs_button.tga" />
|
||||
</textures>
|
||||
|
|
|
|||