Skip to content
Snippets Groups Projects
Commit 7172b76f authored by Mnikolenko ProductEngine's avatar Mnikolenko ProductEngine
Browse files

SL-193 FIXED Show info icons for experiences in Key,Allowed,Blocked lists.

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