CHUI-305: Problem: The 'resident picker' had multiple parents and due to the design of the resident picker it can have only one parent. Having multiple parents caused both parents to fight for depth ordering...which caused the flickering. Resolution: Now multiple 'resident pickers' can exist and they are coupled to the floater that spawned then. Meaning that when the parent floater closes, the 'resident picker' floater will also close. In addition, a shadow frustum eminates from the button that opened the 'resident picker'.
parent
31d69a6bc5
commit
be61b5be2f
|
|
@ -713,6 +713,13 @@ void LLFloater::closeFloater(bool app_quitting)
|
|||
make_ui_sound("UISndWindowClose");
|
||||
}
|
||||
|
||||
//If floater is a dependent, remove it from parent (dependee)
|
||||
LLFloater* dependee = mDependeeHandle.get();
|
||||
if (dependee)
|
||||
{
|
||||
dependee->removeDependentFloater(this);
|
||||
}
|
||||
|
||||
// now close dependent floater
|
||||
for(handle_set_iter_t dependent_it = mDependents.begin();
|
||||
dependent_it != mDependents.end(); )
|
||||
|
|
|
|||
|
|
@ -744,12 +744,13 @@ std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
|
|||
}
|
||||
|
||||
//static
|
||||
void LLAvatarActions::shareWithAvatars()
|
||||
void LLAvatarActions::shareWithAvatars(LLPanel * panel)
|
||||
{
|
||||
using namespace action_give_inventory;
|
||||
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(panel);
|
||||
LLFloaterAvatarPicker* picker =
|
||||
LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE);
|
||||
LLFloaterAvatarPicker::show(boost::bind(give_inventory, _1, _2), TRUE, FALSE, FALSE, root_floater->getName());
|
||||
if (!picker)
|
||||
{
|
||||
return;
|
||||
|
|
@ -757,6 +758,11 @@ void LLAvatarActions::shareWithAvatars()
|
|||
|
||||
picker->setOkBtnEnableCb(boost::bind(is_give_inventory_acceptable));
|
||||
picker->openFriendsTab();
|
||||
|
||||
if (root_floater)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
LLNotificationsUtil::add("ShareNotification");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
class LLAvatarName;
|
||||
class LLInventoryPanel;
|
||||
class LLFloater;
|
||||
class LLPanel;
|
||||
|
||||
/**
|
||||
* Friend-related actions (add, remove, offer teleport, etc)
|
||||
|
|
@ -117,7 +118,7 @@ public:
|
|||
/**
|
||||
* Share items with the picked avatars.
|
||||
*/
|
||||
static void shareWithAvatars();
|
||||
static void shareWithAvatars(LLPanel * panel);
|
||||
|
||||
/**
|
||||
* Block/unblock the avatar.
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@
|
|||
#include "llscrolllistcell.h"
|
||||
#include "lltabcontainer.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "lldraghandle.h"
|
||||
#include "message.h"
|
||||
|
||||
//#include "llsdserialize.h"
|
||||
|
|
@ -56,14 +58,20 @@
|
|||
//put it back as a member once the legacy path is out?
|
||||
static std::map<LLUUID, LLAvatarName> sAvatarNameMap;
|
||||
|
||||
const F32 CONTEXT_CONE_IN_ALPHA = 0.0f;
|
||||
const F32 CONTEXT_CONE_OUT_ALPHA = 1.f;
|
||||
const F32 CONTEXT_FADE_TIME = 0.08f;
|
||||
|
||||
LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
|
||||
BOOL allow_multiple,
|
||||
BOOL closeOnSelect,
|
||||
BOOL skip_agent)
|
||||
BOOL skip_agent,
|
||||
const std::string& name,
|
||||
LLView * frustumOrigin)
|
||||
{
|
||||
// *TODO: Use a key to allow this not to be an effective singleton
|
||||
LLFloaterAvatarPicker* floater =
|
||||
LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker");
|
||||
LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker", LLSD(name));
|
||||
if (!floater)
|
||||
{
|
||||
llwarns << "Cannot instantiate avatar picker" << llendl;
|
||||
|
|
@ -85,6 +93,11 @@ LLFloaterAvatarPicker* LLFloaterAvatarPicker::show(select_callback_t callback,
|
|||
floater->getChild<LLButton>("cancel_btn")->setLabel(close_string);
|
||||
}
|
||||
|
||||
if(frustumOrigin)
|
||||
{
|
||||
floater->mFrustumOrigin = frustumOrigin->getHandle();
|
||||
}
|
||||
|
||||
return floater;
|
||||
}
|
||||
|
||||
|
|
@ -93,7 +106,8 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker(const LLSD& key)
|
|||
: LLFloater(key),
|
||||
mNumResultsReturned(0),
|
||||
mNearMeListComplete(FALSE),
|
||||
mCloseOnSelect(FALSE)
|
||||
mCloseOnSelect(FALSE),
|
||||
mContextConeOpacity ( 0.f )
|
||||
{
|
||||
mCommitCallbackRegistrar.add("Refresh.FriendList", boost::bind(&LLFloaterAvatarPicker::populateFriend, this));
|
||||
}
|
||||
|
|
@ -340,8 +354,67 @@ void LLFloaterAvatarPicker::populateFriend()
|
|||
friends_scroller->sortByColumnIndex(0, TRUE);
|
||||
}
|
||||
|
||||
void LLFloaterAvatarPicker::drawFrustum()
|
||||
{
|
||||
if(mFrustumOrigin.get())
|
||||
{
|
||||
LLView * frustumOrigin = mFrustumOrigin.get();
|
||||
LLRect origin_rect;
|
||||
frustumOrigin->localRectToOtherView(frustumOrigin->getLocalRect(), &origin_rect, this);
|
||||
// draw context cone connecting color picker with color swatch in parent floater
|
||||
LLRect local_rect = getLocalRect();
|
||||
if (hasFocus() && frustumOrigin->isInVisibleChain() && mContextConeOpacity > 0.001f)
|
||||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
{
|
||||
mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
|
||||
}
|
||||
else
|
||||
{
|
||||
mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarPicker::draw()
|
||||
{
|
||||
drawFrustum();
|
||||
|
||||
// sometimes it is hard to determine when Select/Ok button should be disabled (see LLAvatarActions::shareWithAvatars).
|
||||
// lets check this via mOkButtonValidateSignal callback periodically.
|
||||
static LLFrameTimer timer;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
class LLAvatarName;
|
||||
class LLScrollListCtrl;
|
||||
|
||||
class LLFloaterAvatarPicker : public LLFloater
|
||||
class LLFloaterAvatarPicker :public LLFloater
|
||||
{
|
||||
public:
|
||||
typedef boost::signals2::signal<bool(const uuid_vec_t&), boost_boolean_combiner> validate_signal_t;
|
||||
|
|
@ -46,7 +46,9 @@ public:
|
|||
static LLFloaterAvatarPicker* show(select_callback_t callback,
|
||||
BOOL allow_multiple = FALSE,
|
||||
BOOL closeOnSelect = FALSE,
|
||||
BOOL skip_agent = FALSE);
|
||||
BOOL skip_agent = FALSE,
|
||||
const std::string& name = "",
|
||||
LLView * frustumOrigin = NULL);
|
||||
|
||||
LLFloaterAvatarPicker(const LLSD& key);
|
||||
virtual ~LLFloaterAvatarPicker();
|
||||
|
|
@ -86,6 +88,7 @@ private:
|
|||
void setAllowMultiple(BOOL allow_multiple);
|
||||
LLScrollListCtrl* getActiveList();
|
||||
|
||||
void drawFrustum();
|
||||
virtual void draw();
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
|
||||
|
|
@ -94,6 +97,8 @@ private:
|
|||
BOOL mNearMeListComplete;
|
||||
BOOL mCloseOnSelect;
|
||||
BOOL mExcludeAgentFromSearchResults;
|
||||
LLHandle <LLView> mFrustumOrigin;
|
||||
F32 mContextConeOpacity;
|
||||
|
||||
validate_signal_t mOkButtonValidateSignal;
|
||||
select_callback_t mSelectionCallback;
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ void LLFloaterColorPicker::draw()
|
|||
mSwatch->localRectToOtherView(mSwatch->getLocalRect(), &swatch_rect, this);
|
||||
// draw context cone connecting color picker with color swatch in parent floater
|
||||
LLRect local_rect = getLocalRect();
|
||||
if (gFocusMgr.childHasKeyboardFocus(this) && mSwatch->isInVisibleChain() && mContextConeOpacity > 0.001f)
|
||||
if (hasFocus() && mSwatch->isInVisibleChain() && mContextConeOpacity > 0.001f)
|
||||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
|
|
|
|||
|
|
@ -1123,11 +1123,13 @@ bool LLPanelObjectTools::callbackSimWideDeletes( const LLSD& notification, const
|
|||
|
||||
void LLPanelObjectTools::onClickSet()
|
||||
{
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2));
|
||||
LLView * button = getChildView("Set Target");
|
||||
LLFloater * root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelObjectTools::callbackAvatarID, this, _1,_2), FALSE, FALSE, FALSE, root_floater->getName(), button);
|
||||
// grandparent is a floater, which can have a dependent
|
||||
if (picker)
|
||||
{
|
||||
gFloaterView->getParentFloater(this)->addDependentFloater(picker);
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2733,11 +2733,13 @@ void LLPanelLandAccess::onCommitAny(LLUICtrl *ctrl, void *userdata)
|
|||
|
||||
void LLPanelLandAccess::onClickAddAccess()
|
||||
{
|
||||
LLView * button = getChildView("add_allowed");
|
||||
LLFloater * root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1));
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1), FALSE, FALSE, FALSE, root_floater->getName(), button);
|
||||
if (picker)
|
||||
{
|
||||
gFloaterView->getParentFloater(this)->addDependentFloater(picker);
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2782,11 +2784,13 @@ void LLPanelLandAccess::onClickRemoveAccess(void* data)
|
|||
// static
|
||||
void LLPanelLandAccess::onClickAddBanned()
|
||||
{
|
||||
LLView * button = getChildView("add_banned");
|
||||
LLFloater * root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1));
|
||||
boost::bind(&LLPanelLandAccess::callbackAvatarCBBanned, this, _1), FALSE, FALSE, FALSE, root_floater->getName(), button);
|
||||
if (picker)
|
||||
{
|
||||
gFloaterView->getParentFloater(this)->addDependentFloater(picker);
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ void LLPanelRegionGeneralInfo::onClickKick()
|
|||
// this depends on the grandparent view being a floater
|
||||
// in order to set up floater dependency
|
||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1), FALSE, TRUE);
|
||||
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionGeneralInfo::onKickCommit, this, _1), FALSE, TRUE, FALSE, parent_floater->getName());
|
||||
if (child_floater)
|
||||
{
|
||||
parent_floater->addDependentFloater(child_floater);
|
||||
|
|
@ -924,7 +924,12 @@ BOOL LLPanelRegionDebugInfo::sendUpdate()
|
|||
|
||||
void LLPanelRegionDebugInfo::onClickChooseAvatar()
|
||||
{
|
||||
LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), FALSE, TRUE);
|
||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloater * child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelRegionDebugInfo::callbackAvatarID, this, _1, _2), FALSE, TRUE, FALSE, parent_floater->getName());
|
||||
if (child_floater)
|
||||
{
|
||||
parent_floater->addDependentFloater(child_floater);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1471,7 +1476,7 @@ void LLPanelEstateInfo::onClickKickUser()
|
|||
// this depends on the grandparent view being a floater
|
||||
// in order to set up floater dependency
|
||||
LLFloater* parent_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1), FALSE, TRUE);
|
||||
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::onKickUserCommit, this, _1), FALSE, TRUE, FALSE, parent_floater->getName());
|
||||
if (child_floater)
|
||||
{
|
||||
parent_floater->addDependentFloater(child_floater);
|
||||
|
|
@ -1646,8 +1651,21 @@ bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& res
|
|||
}
|
||||
|
||||
LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo(notification["payload"]);
|
||||
//Get parent floater name
|
||||
LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
|
||||
LLFloater* parent_floater = panel ? gFloaterView->getParentFloater(panel) : NULL;
|
||||
const std::string& parent_floater_name = parent_floater ? parent_floater->getName() : "";
|
||||
|
||||
// avatar picker yes multi-select, yes close-on-select
|
||||
LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::accessAddCore3, _1, (void*)change_info), TRUE, TRUE);
|
||||
LLFloater* child_floater = LLFloaterAvatarPicker::show(boost::bind(&LLPanelEstateInfo::accessAddCore3, _1, (void*)change_info),
|
||||
TRUE, TRUE, FALSE, parent_floater_name);
|
||||
|
||||
//Allows the closed parent floater to close the child floater (avatar picker)
|
||||
if (child_floater)
|
||||
{
|
||||
parent_floater->addDependentFloater(child_floater);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -285,10 +285,13 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
|
|||
|
||||
void LLFloaterReporter::onClickSelectAbuser()
|
||||
{
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE );
|
||||
LLView * button = getChildView("select_abuser", TRUE);
|
||||
|
||||
LLFloater * root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button);
|
||||
if (picker)
|
||||
{
|
||||
gFloaterView->getParentFloater(this)->addDependentFloater(picker);
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -392,7 +392,8 @@ void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata)
|
|||
|
||||
void LLFloaterSellLandUI::doSelectAgent()
|
||||
{
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE);
|
||||
LLView * button = getChildView("sell_to_select_agent");
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE, FALSE, this->getName(), button);
|
||||
// grandparent is a floater, in order to set up dependency
|
||||
if (picker)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -359,7 +359,9 @@ BOOL LLIMFloater::postBuild()
|
|||
|
||||
void LLIMFloater::onAddButtonClicked()
|
||||
{
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLIMFloater::addSessionParticipants, this, _1), TRUE, TRUE);
|
||||
LLView * button = getChildView("toolbar_panel")->getChildView("add_btn");
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLIMFloater::addSessionParticipants, this, _1), TRUE, TRUE, FALSE, root_floater->getName(), button);
|
||||
if (!picker)
|
||||
{
|
||||
return;
|
||||
|
|
@ -367,7 +369,7 @@ void LLIMFloater::onAddButtonClicked()
|
|||
|
||||
// Need to disable 'ok' button when selected users are already in conversation.
|
||||
picker->setOkBtnEnableCb(boost::bind(&LLIMFloater::canAddSelectedToChat, this, _1));
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
|
||||
if (root_floater)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
|
|
|
|||
|
|
@ -415,8 +415,10 @@ void LLIMFloaterContainer::updateState(bool collapse, S32 delta_width)
|
|||
|
||||
void LLIMFloaterContainer::onAddButtonClicked()
|
||||
{
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLIMFloaterContainer::onAvatarPicked, this, _1), TRUE, TRUE, TRUE);
|
||||
LLView * button = getChildView("conversations_pane_buttons_expanded")->getChildView("add_btn");
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLIMFloaterContainer::onAvatarPicked, this, _1), TRUE, TRUE, TRUE, root_floater->getName(), button);
|
||||
|
||||
if (picker && root_floater)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
|
|||
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
|
||||
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars));
|
||||
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,10 +66,19 @@ LLPanelBlockedList::LLPanelBlockedList()
|
|||
mEnableCallbackRegistrar.add("Block.Check", boost::bind(&LLPanelBlockedList::isActionChecked, this, _2));
|
||||
}
|
||||
|
||||
void LLPanelBlockedList::removePicker()
|
||||
{
|
||||
if(mPicker.get())
|
||||
{
|
||||
mPicker.get()->closeFloater();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPanelBlockedList::postBuild()
|
||||
{
|
||||
mBlockedList = getChild<LLBlockList>("blocked");
|
||||
mBlockedList->setCommitOnSelectionChange(TRUE);
|
||||
this->setVisibleCallback(boost::bind(&LLPanelBlockedList::removePicker, this));
|
||||
|
||||
switch (gSavedSettings.getU32("BlockPeopleSortOrder"))
|
||||
{
|
||||
|
|
@ -185,11 +194,18 @@ void LLPanelBlockedList::blockResidentByName()
|
|||
{
|
||||
const BOOL allow_multiple = FALSE;
|
||||
const BOOL close_on_select = TRUE;
|
||||
/*LLFloaterAvatarPicker* picker = */LLFloaterAvatarPicker::show(boost::bind(&LLPanelBlockedList::callbackBlockPicked, this, _1, _2), allow_multiple, close_on_select);
|
||||
|
||||
LLView * button = getChildView("plus_btn", TRUE);
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelBlockedList::callbackBlockPicked, this, _1, _2),
|
||||
allow_multiple, close_on_select, FALSE, root_floater->getName(), button);
|
||||
|
||||
if (root_floater)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
|
||||
// *TODO: mantipov: should LLFloaterAvatarPicker be closed when panel is closed?
|
||||
// old Floater dependency is not enable in panel
|
||||
// addDependentFloater(picker);
|
||||
mPicker = picker->getHandle();
|
||||
}
|
||||
|
||||
void LLPanelBlockedList::blockObjectByName()
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ private:
|
|||
E_SORT_BY_TYPE = 1,
|
||||
} ESortOrder;
|
||||
|
||||
void removePicker();
|
||||
void updateButtons();
|
||||
|
||||
// UI callbacks
|
||||
|
|
@ -78,6 +79,7 @@ private:
|
|||
|
||||
private:
|
||||
LLBlockList* mBlockedList;
|
||||
LLHandle<LLFloater> mPicker;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -301,11 +301,13 @@ void LLPanelGroupInvite::impl::callbackClickAdd(void* userdata)
|
|||
//Soon the avatar picker will be embedded into this panel
|
||||
//instead of being it's own separate floater. But that is next week.
|
||||
//This will do for now. -jwolk May 10, 2006
|
||||
LLView * button = panelp->getChildView("add_button");
|
||||
LLFloater * root_floater = gFloaterView->getParentFloater(panelp);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(
|
||||
boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), TRUE);
|
||||
boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), TRUE, FALSE, FALSE, root_floater->getName(), button);
|
||||
if (picker)
|
||||
{
|
||||
gFloaterView->getParentFloater(panelp)->addDependentFloater(picker);
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
|
|||
mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this));
|
||||
mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this));
|
||||
mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars));
|
||||
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
|
||||
|
||||
mSavedFolderState = new LLSaveFolderState();
|
||||
mSavedFolderState->setApply(FALSE);
|
||||
|
|
|
|||
|
|
@ -1498,7 +1498,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
|
|||
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing));
|
||||
mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing));
|
||||
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing));
|
||||
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars));
|
||||
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
|
||||
}
|
||||
|
||||
// Destroys the object
|
||||
|
|
|
|||
|
|
@ -556,6 +556,15 @@ void LLPanelPeople::onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LL
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void LLPanelPeople::removePicker()
|
||||
{
|
||||
if(mPicker.get())
|
||||
{
|
||||
mPicker.get()->closeFloater();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPanelPeople::postBuild()
|
||||
{
|
||||
getChild<LLFilterEditor>("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
|
||||
|
|
@ -571,6 +580,7 @@ BOOL LLPanelPeople::postBuild()
|
|||
LLPanel* friends_tab = getChild<LLPanel>(FRIENDS_TAB_NAME);
|
||||
// updater is active only if panel is visible to user.
|
||||
friends_tab->setVisibleCallback(boost::bind(&Updater::setActive, mFriendListUpdater, _2));
|
||||
friends_tab->setVisibleCallback(boost::bind(&LLPanelPeople::removePicker, this));
|
||||
mOnlineFriendList = friends_tab->getChild<LLAvatarList>("avatars_online");
|
||||
mAllFriendList = friends_tab->getChild<LLAvatarList>("avatars_all");
|
||||
mOnlineFriendList->setNoItemsCommentText(getString("no_friends_online"));
|
||||
|
|
@ -1079,8 +1089,12 @@ bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids)
|
|||
|
||||
void LLPanelPeople::onAddFriendWizButtonClicked()
|
||||
{
|
||||
LLPanel* cur_panel = mTabContainer->getCurrentPanel();
|
||||
LLView * button = cur_panel->getChildView("friends_add_btn", TRUE);
|
||||
|
||||
// Show add friend wizard.
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE);
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button);
|
||||
if (!picker)
|
||||
{
|
||||
return;
|
||||
|
|
@ -1088,11 +1102,13 @@ void LLPanelPeople::onAddFriendWizButtonClicked()
|
|||
|
||||
// Need to disable 'ok' button when friend occurs in selection
|
||||
picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1));
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
|
||||
if (root_floater)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
|
||||
mPicker = picker->getHandle();
|
||||
}
|
||||
|
||||
void LLPanelPeople::onDeleteFriendButtonClicked()
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ private:
|
|||
E_SORT_BY_RECENT_SPEAKERS = 4,
|
||||
} ESortOrder;
|
||||
|
||||
void removePicker();
|
||||
|
||||
// methods indirectly called by the updaters
|
||||
void updateFriendListHelpText();
|
||||
void updateFriendList();
|
||||
|
|
@ -139,6 +141,7 @@ private:
|
|||
Updater* mNearbyListUpdater;
|
||||
Updater* mRecentListUpdater;
|
||||
Updater* mButtonsUpdater;
|
||||
LLHandle< LLFloater > mPicker;
|
||||
};
|
||||
|
||||
#endif //LL_LLPANELPEOPLE_H
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ void LLSidepanelInventory::onInfoButtonClicked()
|
|||
|
||||
void LLSidepanelInventory::onShareButtonClicked()
|
||||
{
|
||||
LLAvatarActions::shareWithAvatars();
|
||||
LLAvatarActions::shareWithAvatars(this);
|
||||
}
|
||||
|
||||
void LLSidepanelInventory::onShopButtonClicked()
|
||||
|
|
|
|||
Loading…
Reference in New Issue