aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-04-11 22:19:20 -0700
committerMcCabe Maxsted2011-04-11 22:21:59 -0700
commit46d05be164bcf2935995a963a1afe106b5d2aa25 (patch)
tree75a69cba0e03f607e95c0da848fa2bcc063ac381 /linden/indra
parentPorted changes to the inspect window from Ascent by Hazim: added last owner, ... (diff)
downloadmeta-impy-46d05be164bcf2935995a963a1afe106b5d2aa25.zip
meta-impy-46d05be164bcf2935995a963a1afe106b5d2aa25.tar.gz
meta-impy-46d05be164bcf2935995a963a1afe106b5d2aa25.tar.bz2
meta-impy-46d05be164bcf2935995a963a1afe106b5d2aa25.tar.xz
Added Last Owner Profile button to the inspect window
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/newview/llfloaterinspect.cpp37
-rw-r--r--linden/indra/newview/llfloaterinspect.h1
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml13
3 files changed, 47 insertions, 4 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();
diff --git a/linden/indra/newview/llfloaterinspect.h b/linden/indra/newview/llfloaterinspect.h
index 5d05f48..ae443f9 100644
--- a/linden/indra/newview/llfloaterinspect.h
+++ b/linden/indra/newview/llfloaterinspect.h
@@ -57,6 +57,7 @@ public:
57 virtual void onFocusReceived(); 57 virtual void onFocusReceived();
58 static void onClickCreatorProfile(void* ctrl); 58 static void onClickCreatorProfile(void* ctrl);
59 static void onClickOwnerProfile(void* ctrl); 59 static void onClickOwnerProfile(void* ctrl);
60 static void onClickLastOwnerProfile(void* ctrl);
60 static void onSelectObject(LLUICtrl* ctrl, void* user_data); 61 static void onSelectObject(LLUICtrl* ctrl, void* user_data);
61 LLScrollListCtrl* mObjectList; 62 LLScrollListCtrl* mObjectList;
62protected: 63protected:
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml b/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml
index b28174b..5e9cacd 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_inspect.xml
@@ -18,12 +18,17 @@
18 <column label="Creation Date" name="creation_date" width="150" /> 18 <column label="Creation Date" name="creation_date" width="150" />
19 </scroll_list> 19 </scroll_list>
20 <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20" 20 <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
21 label="See Owner Profile..." label_selected="" left="10" 21 label="Owner Profile" label_selected="" left="10"
22 mouse_opaque="true" name="button owner" 22 mouse_opaque="true" name="button owner"
23 tool_tip="See profile of the highlighted object&apos;s owner" width="150" /> 23 tool_tip="See profile of the highlighted object&apos;s owner" width="130" />
24 <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20" 24 <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
25 label="See Creator Profile..." label_selected="" left="170" 25 label="Last Owner Profile" label_selected="" left="150"
26 mouse_opaque="true" name="button_last_owner"
27 tool_tip="See profile of the highlighted object&apos;s last owner"
28 width="130" />
29 <button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
30 label="Creator Profile" label_selected="" left="290"
26 mouse_opaque="true" name="button creator" 31 mouse_opaque="true" name="button creator"
27 tool_tip="See profile of the highlighted object&apos;s original creator" 32 tool_tip="See profile of the highlighted object&apos;s original creator"
28 width="150" /> 33 width="130" />
29</floater> 34</floater>