aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterinspect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloaterinspect.cpp')
-rw-r--r--linden/indra/newview/llfloaterinspect.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterinspect.cpp b/linden/indra/newview/llfloaterinspect.cpp
index 6701fdb..54f68fd 100644
--- a/linden/indra/newview/llfloaterinspect.cpp
+++ b/linden/indra/newview/llfloaterinspect.cpp
@@ -161,10 +161,44 @@ void LLFloaterInspect::onClickOwnerProfile(void* ctrl)
161 } 161 }
162} 162}
163 163
164void LLFloaterInspect::onClickLastOwnerProfile(void* ctrl)
165{
166 if(sInstance->mObjectList->getAllSelected().size() == 0) return;
167 LLScrollListItem* first_selected =
168 sInstance->mObjectList->getFirstSelected();
169
170 if (first_selected)
171 {
172 LLUUID selected_id = first_selected->getUUID();
173 struct f : public LLSelectedNodeFunctor
174 {
175 LLUUID obj_id;
176 f(const LLUUID& id) : obj_id(id) {}
177 virtual bool apply(LLSelectNode* node)
178 {
179 return (obj_id == node->getObject()->getID());
180 }
181 } func(selected_id);
182 LLSelectNode* node = sInstance->mObjectSelection->getFirstNode(&func);
183 if(node)
184 {
185 const LLUUID& last_owner_id = node->mPermissions->getLastOwner();
186// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
187 if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
188 {
189 LLFloaterAvatarInfo::showFromDirectory(last_owner_id);
190 }
191// [/RLVa:KB]
192// LLFloaterAvatarInfo::showFromDirectory(owner_id);
193 }
194 }
195}
196
164BOOL LLFloaterInspect::postBuild() 197BOOL LLFloaterInspect::postBuild()
165{ 198{
166 mObjectList = getChild<LLScrollListCtrl>("object_list"); 199 mObjectList = getChild<LLScrollListCtrl>("object_list");
167 childSetAction("button owner",onClickOwnerProfile, this); 200 childSetAction("button owner",onClickOwnerProfile, this);
201 childSetAction("button_last_owner",onClickLastOwnerProfile, this);
168 childSetAction("button creator",onClickCreatorProfile, this); 202 childSetAction("button creator",onClickCreatorProfile, this);
169 childSetCommitCallback("object_list", onSelectObject); 203 childSetCommitCallback("object_list", onSelectObject);
170 return TRUE; 204 return TRUE;
@@ -175,8 +209,10 @@ void LLFloaterInspect::onSelectObject(LLUICtrl* ctrl, void* user_data)
175 if(LLFloaterInspect::getSelectedUUID() != LLUUID::null) 209 if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
176 { 210 {
177 //sInstance->childSetEnabled("button owner", true); 211 //sInstance->childSetEnabled("button owner", true);
212 //sInstance->childSetEnabled("button_last_owner", true);
178// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e 213// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
179 sInstance->childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)); 214 sInstance->childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
215 sInstance->childSetEnabled("button_last_owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
180// [/RLVa:KB] 216// [/RLVa:KB]
181 sInstance->childSetEnabled("button creator", true); 217 sInstance->childSetEnabled("button creator", true);
182 } 218 }
@@ -205,6 +241,7 @@ void LLFloaterInspect::refresh()
205 std::string creator_name; 241 std::string creator_name;
206 S32 pos = mObjectList->getScrollPos(); 242 S32 pos = mObjectList->getScrollPos();
207 childSetEnabled("button owner", false); 243 childSetEnabled("button owner", false);
244 childSetEnabled("button_last_owner", false);
208 childSetEnabled("button creator", false); 245 childSetEnabled("button creator", false);
209 LLUUID selected_uuid; 246 LLUUID selected_uuid;
210 S32 selected_index = mObjectList->getFirstSelectedIndex(); 247 S32 selected_index = mObjectList->getFirstSelectedIndex();