SL-193 FIXED Show info icons for experiences in Key,Allowed,Blocked lists.
parent
4ab4c6da02
commit
7172b76f0e
|
|
@ -130,8 +130,14 @@ BOOL LLNameListCtrl::handleDragAndDrop(
|
|||
return handled;
|
||||
}
|
||||
|
||||
void LLNameListCtrl::showInspector(const LLUUID& avatar_id, bool is_group)
|
||||
void LLNameListCtrl::showInspector(const LLUUID& avatar_id, bool is_group, bool is_experience)
|
||||
{
|
||||
if(is_experience)
|
||||
{
|
||||
LLFloaterReg::showInstance("experience_profile", avatar_id, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_group)
|
||||
LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", avatar_id));
|
||||
else
|
||||
|
|
@ -230,10 +236,11 @@ BOOL LLNameListCtrl::handleToolTip(S32 x, S32 y, MASK mask)
|
|||
|
||||
// Should we show a group or an avatar inspector?
|
||||
bool is_group = hit_item->isGroup();
|
||||
bool is_experience = hit_item->isExperience();
|
||||
|
||||
LLToolTip::Params params;
|
||||
params.background_visible( false );
|
||||
params.click_callback( boost::bind(&LLNameListCtrl::showInspector, this, avatar_id, is_group) );
|
||||
params.click_callback( boost::bind(&LLNameListCtrl::showInspector, this, avatar_id, is_group, is_experience) );
|
||||
params.delay_time(0.0f); // spawn instantly on hover
|
||||
params.image( icon );
|
||||
params.message("");
|
||||
|
|
@ -295,7 +302,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
|
|||
const std::string& prefix)
|
||||
{
|
||||
LLUUID id = name_item.value().asUUID();
|
||||
LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP);
|
||||
LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP, name_item.target() == EXPERIENCE);
|
||||
|
||||
if (!item) return NULL;
|
||||
|
||||
|
|
@ -353,6 +360,8 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
|
|||
}
|
||||
break;
|
||||
}
|
||||
case EXPERIENCE:
|
||||
// just use supplied name
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,22 +44,30 @@ class LLNameListItem : public LLScrollListItem, public LLHandleProvider<LLNameLi
|
|||
public:
|
||||
bool isGroup() const { return mIsGroup; }
|
||||
void setIsGroup(bool is_group) { mIsGroup = is_group; }
|
||||
bool isExperience() const { return mIsExperience; }
|
||||
void setIsExperience(bool is_experience) { mIsExperience = is_experience; }
|
||||
|
||||
protected:
|
||||
friend class LLNameListCtrl;
|
||||
|
||||
LLNameListItem( const LLScrollListItem::Params& p )
|
||||
: LLScrollListItem(p), mIsGroup(false)
|
||||
: LLScrollListItem(p), mIsGroup(false), mIsExperience(false)
|
||||
{
|
||||
}
|
||||
|
||||
LLNameListItem( const LLScrollListItem::Params& p, bool is_group )
|
||||
: LLScrollListItem(p), mIsGroup(is_group)
|
||||
: LLScrollListItem(p), mIsGroup(is_group), mIsExperience(false)
|
||||
{
|
||||
}
|
||||
|
||||
LLNameListItem( const LLScrollListItem::Params& p, bool is_group, bool is_experience )
|
||||
: LLScrollListItem(p), mIsGroup(is_group), mIsExperience(is_experience)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
bool mIsGroup;
|
||||
bool mIsExperience;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -73,7 +81,8 @@ public:
|
|||
{
|
||||
INDIVIDUAL,
|
||||
GROUP,
|
||||
SPECIAL
|
||||
SPECIAL,
|
||||
EXPERIENCE
|
||||
} ENameType;
|
||||
|
||||
// provide names for enums
|
||||
|
|
@ -160,7 +169,7 @@ public:
|
|||
|
||||
/*virtual*/ void mouseOverHighlightNthItem( S32 index );
|
||||
private:
|
||||
void showInspector(const LLUUID& avatar_id, bool is_group);
|
||||
void showInspector(const LLUUID& avatar_id, bool is_group, bool is_experience = false);
|
||||
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name, std::string suffix, LLHandle<LLNameListItem> item);
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "llfloaterexperiencepicker.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llhandle.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llagent.h"
|
||||
|
|
@ -54,7 +55,7 @@ LLPanelExperienceListEditor::LLPanelExperienceListEditor()
|
|||
|
||||
BOOL LLPanelExperienceListEditor::postBuild()
|
||||
{
|
||||
mItems = getChild<LLScrollListCtrl>("experience_list");
|
||||
mItems = getChild<LLNameListCtrl>("experience_list");
|
||||
mAdd = getChild<LLButton>("btn_add");
|
||||
mRemove = getChild<LLButton>("btn_remove");
|
||||
mProfile = getChild<LLButton>("btn_profile");
|
||||
|
|
@ -178,12 +179,13 @@ void LLPanelExperienceListEditor::onItems()
|
|||
{
|
||||
const LLUUID& experience = *it;
|
||||
item["id"]=experience;
|
||||
item["target"] = LLNameListCtrl::EXPERIENCE;
|
||||
LLSD& columns = item["columns"];
|
||||
columns[0]["column"] = "experience_name";
|
||||
columns[0]["value"] = getString("loading");
|
||||
mItems->addElement(item);
|
||||
|
||||
LLExperienceCache::get(experience, boost::bind(&LLPanelExperienceListEditor::experienceDetailsCallback,
|
||||
LLExperienceCache::get(experience, boost::bind(&LLPanelExperienceListEditor::experienceDetailsCallback,
|
||||
getDerivedHandle<LLPanelExperienceListEditor>(), _1));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "lluuid.h"
|
||||
#include <set>
|
||||
|
||||
class LLNameListCtrl;
|
||||
class LLScrollListCtrl;
|
||||
class LLButton;
|
||||
class LLFloaterExperiencePicker;
|
||||
|
|
@ -82,7 +83,7 @@ private:
|
|||
uuid_list_t mExperienceIds;
|
||||
|
||||
|
||||
LLScrollListCtrl* mItems;
|
||||
LLNameListCtrl* mItems;
|
||||
filter_list mFilters;
|
||||
LLButton* mAdd;
|
||||
LLButton* mRemove;
|
||||
|
|
|
|||
|
|
@ -47,19 +47,19 @@
|
|||
height="12"
|
||||
follows="top|left">
|
||||
</text>
|
||||
<scroll_list
|
||||
<name_list
|
||||
draw_heading="false"
|
||||
left="3"
|
||||
width="225"
|
||||
height="75"
|
||||
follows="all"
|
||||
name="experience_list">
|
||||
<columns
|
||||
<name_list.columns
|
||||
width="225"
|
||||
user_resize="false"
|
||||
name="experience_name"
|
||||
label="Name"/>
|
||||
</scroll_list>
|
||||
</name_list>
|
||||
<button
|
||||
layout="topleft"
|
||||
follows="top|right"
|
||||
|
|
|
|||
Loading…
Reference in New Issue