summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-09 14:44:56 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-09 14:44:56 +0200
commitcd328841106734938dd747e9a7fd2575cd6c1b85 (patch)
treef386a1511678e875f1b2cb6e95bf5bbabebbb36a /indra
parentf2f57797482bb22c6aa857f7af6f65510573ffff (diff)
Update for major task EXT-2250 Classifieds list in Picks panel.
Fixed viewing classifieds of other avatars. --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llavatarpropertiesprocessor.cpp8
-rw-r--r--indra/newview/llavatarpropertiesprocessor.h4
-rw-r--r--indra/newview/llpanelpicks.cpp19
-rw-r--r--indra/newview/llpanelpicks.h8
4 files changed, 26 insertions, 13 deletions
diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp
index 98a6a4b92a..2942e436ef 100644
--- a/indra/newview/llavatarpropertiesprocessor.cpp
+++ b/indra/newview/llavatarpropertiesprocessor.cpp
@@ -333,13 +333,13 @@ void LLAvatarPropertiesProcessor::processClassifiedInfoReply(LLMessageSystem* ms
msg->getString(_PREHASH_Data, _PREHASH_SimName, c_info.sim_name);
msg->getVector3d(_PREHASH_Data, _PREHASH_PosGlobal, c_info.pos_global);
msg->getString(_PREHASH_Data, _PREHASH_ParcelName, c_info.parcel_name);
- msg->getU8(_PREHASH_Data, _PREHASH_ClassifiedFlags, c_info.classified_flags);
+ msg->getU8(_PREHASH_Data, _PREHASH_ClassifiedFlags, c_info.flags);
msg->getS32(_PREHASH_Data, _PREHASH_PriceForListing, c_info.price_for_listing);
LLAvatarPropertiesProcessor* self = getInstance();
// Request processed, no longer pending
- self->removePendingRequest(c_info.agent_id, APT_CLASSIFIED_INFO);
- self->notifyObservers(c_info.agent_id, &c_info, APT_CLASSIFIED_INFO);
+ self->removePendingRequest(c_info.creator_id, APT_CLASSIFIED_INFO);
+ self->notifyObservers(c_info.creator_id, &c_info, APT_CLASSIFIED_INFO);
}
@@ -564,7 +564,7 @@ void LLAvatarPropertiesProcessor::sendPickInfoRequest(const LLUUID& creator_id,
send_generic_message("pickinforequest", request_params);
}
-void LLAvatarPropertiesProcessor::sendClassifiedInfoRequest(const LLUUID& avatar_id, const LLUUID& classified_id)
+void LLAvatarPropertiesProcessor::sendClassifiedInfoRequest(const LLUUID& classified_id)
{
LLMessageSystem* msg = gMessageSystem;
diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h
index 3c6b4e17d9..64964b1665 100644
--- a/indra/newview/llavatarpropertiesprocessor.h
+++ b/indra/newview/llavatarpropertiesprocessor.h
@@ -171,7 +171,7 @@ struct LLAvatarClassifiedInfo
std::string sim_name;
LLVector3d pos_global;
std::string parcel_name;
- U8 classified_flags;
+ U8 flags;
S32 price_for_listing;
};
@@ -206,7 +206,7 @@ public:
// Duplicate pick info requests are not suppressed.
void sendPickInfoRequest(const LLUUID& creator_id, const LLUUID& pick_id);
- void sendClassifiedInfoRequest(const LLUUID& avatar_id, const LLUUID& classified_id);
+ void sendClassifiedInfoRequest(const LLUUID& classified_id);
void sendAvatarPropertiesUpdate(const LLAvatarData* avatar_props);
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 88c1d17a02..78f8152b10 100644
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -175,7 +175,7 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type)
LLClassifiedItem* c_item = new LLClassifiedItem(getAvatarId(), c_data.classified_id);
c_item->childSetAction("info_chevron", boost::bind(&LLPanelPicks::onClickInfo, this));
- c_item->setName(c_data.name);
+ c_item->setClassifiedName(c_data.name);
LLSD pick_value = LLSD();
pick_value.insert(CLASSIFIED_ID, c_data.classified_id);
@@ -364,6 +364,9 @@ void LLPanelPicks::onOpen(const LLSD& key)
if(getAvatarId() != id)
{
+ showAccordion("tab_picks", false);
+ showAccordion("tab_classifieds", false);
+
mPicksList->goToTop();
// Set dummy value to make panel dirty and make it reload picks
setValue(LLSD());
@@ -856,7 +859,7 @@ LLClassifiedItem::LLClassifiedItem(const LLUUID& avatar_id, const LLUUID& classi
LLUICtrlFactory::getInstance()->buildPanel(this,"panel_classifieds_list_item.xml");
LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
- LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getAvatarId(), getClassifiedId());
+ LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
}
LLClassifiedItem::~LLClassifiedItem()
@@ -872,13 +875,12 @@ void LLClassifiedItem::processProperties(void* data, EAvatarProcessorType type)
}
LLAvatarClassifiedInfo* c_info = static_cast<LLAvatarClassifiedInfo*>(data);
- if( !(c_info && c_info->agent_id == getAvatarId()
- && c_info->classified_id == getClassifiedId()) )
+ if( !c_info || c_info->classified_id != getClassifiedId() )
{
return;
}
- setName(c_info->name);
+ setClassifiedName(c_info->name);
setDescription(c_info->description);
setSnapshotId(c_info->snapshot_id);
setPosGlobal(c_info->pos_global);
@@ -900,7 +902,7 @@ void LLClassifiedItem::setValue(const LLSD& value)
childSetVisible("selected_icon", value["selected"]);
}
-void LLClassifiedItem::setName(const std::string& name)
+void LLClassifiedItem::setClassifiedName(const std::string& name)
{
childSetValue("name", name);
}
@@ -915,4 +917,9 @@ void LLClassifiedItem::setSnapshotId(const LLUUID& snapshot_id)
childSetValue("picture", snapshot_id);
}
+LLUUID LLClassifiedItem::getSnapshotId()
+{
+ return childGetValue("picture");
+}
+
//EOF
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h
index ef7ba9e700..daf8059fee 100644
--- a/indra/newview/llpanelpicks.h
+++ b/indra/newview/llpanelpicks.h
@@ -237,12 +237,18 @@ public:
const LLVector3d& getPosGlobal() { return mPosGlobal; }
- void setName (const std::string& name);
+ void setClassifiedName (const std::string& name);
+
+ std::string getClassifiedName() { return childGetValue("name").asString(); }
void setDescription(const std::string& desc);
+ std::string getDescription() { return childGetValue("description").asString(); }
+
void setSnapshotId(const LLUUID& snapshot_id);
+ LLUUID getSnapshotId();
+
private:
LLUUID mAvatarId;
LLUUID mClassifiedId;