aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-09-07 18:09:25 -0700
committerMcCabe Maxsted2009-09-07 18:09:25 -0700
commitd6973dce3fd453599eccf5519c30672124d622d7 (patch)
tree4ff616f21a404d2c8eb113ce5c9e45e0b8c211f2 /linden
parentFixed tool brush size (diff)
downloadmeta-impy-d6973dce3fd453599eccf5519c30672124d622d7.zip
meta-impy-d6973dce3fd453599eccf5519c30672124d622d7.tar.gz
meta-impy-d6973dce3fd453599eccf5519c30672124d622d7.tar.bz2
meta-impy-d6973dce3fd453599eccf5519c30672124d622d7.tar.xz
Applied and tweaked last owner in tools window from Emerald viewer
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelpermissions.cpp65
-rw-r--r--linden/indra/newview/llpanelpermissions.h1
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_tools.xml24
3 files changed, 54 insertions, 36 deletions
diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp
index c430922..439d8b4 100644
--- a/linden/indra/newview/llpanelpermissions.cpp
+++ b/linden/indra/newview/llpanelpermissions.cpp
@@ -84,6 +84,7 @@ BOOL LLPanelPermissions::postBuild()
84 84
85 85
86 this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this); 86 this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this);
87 this->childSetAction("button last owner profile",LLPanelPermissions::onClickLastOwner,this);
87 this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this); 88 this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this);
88 89
89 this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this); 90 this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this);
@@ -177,6 +178,11 @@ void LLPanelPermissions::refresh()
177 childSetEnabled("Owner Name",false); 178 childSetEnabled("Owner Name",false);
178 childSetEnabled("button owner profile",false); 179 childSetEnabled("button owner profile",false);
179 180
181 childSetEnabled("Last Owner:",false);
182 childSetText("Last Owner Name",LLStringUtil::null);
183 childSetEnabled("Last Owner Name",false);
184 childSetEnabled("button last owner profile",false);
185
180 childSetEnabled("Group:",false); 186 childSetEnabled("Group:",false);
181 childSetText("Group Name",LLStringUtil::null); 187 childSetText("Group Name",LLStringUtil::null);
182 childSetEnabled("Group Name",false); 188 childSetEnabled("Group Name",false);
@@ -190,9 +196,6 @@ void LLPanelPermissions::refresh()
190 childSetEnabled("Description:",false); 196 childSetEnabled("Description:",false);
191 childSetText("Object Description",LLStringUtil::null); 197 childSetText("Object Description",LLStringUtil::null);
192 childSetEnabled("Object Description",false); 198 childSetEnabled("Object Description",false);
193
194 childSetText("prim info",LLStringUtil::null);
195 childSetEnabled("prim info",false);
196 199
197 childSetEnabled("Permissions:",false); 200 childSetEnabled("Permissions:",false);
198 201
@@ -299,6 +302,8 @@ void LLPanelPermissions::refresh()
299 owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); 302 owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name);
300 303
301// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; 304// llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl;
305 std::string last_owner_name;
306 LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name);
302 307
303 if (mOwnerID.isNull()) 308 if (mOwnerID.isNull())
304 { 309 {
@@ -309,8 +314,8 @@ void LLPanelPermissions::refresh()
309 else 314 else
310 { 315 {
311 // Display last owner if public 316 // Display last owner if public
312 std::string last_owner_name; 317 //std::string last_owner_name;
313 LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); 318 //LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name);
314 319
315 // It should never happen that the last owner is null and the owner 320 // It should never happen that the last owner is null and the owner
316 // is null, but it seems to be a bug in the simulator right now. JC 321 // is null, but it seems to be a bug in the simulator right now. JC
@@ -326,6 +331,19 @@ void LLPanelPermissions::refresh()
326 childSetEnabled("Owner Name",TRUE); 331 childSetEnabled("Owner Name",TRUE);
327 childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); 332 childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
328 333
334 if (owner_name != last_owner_name)
335 {
336 childSetText("Last Owner Name", last_owner_name);
337 childSetEnabled("Last Owner Name", TRUE);
338 childSetEnabled("button last owner profile", TRUE);
339 }
340 else
341 {
342 childSetText("Last Owner Name", LLStringUtil::null);
343 childSetEnabled("Last Owner Name", FALSE);
344 childSetEnabled("button last owner profile", FALSE);
345 }
346
329 // update group text field 347 // update group text field
330 childSetEnabled("Group:",true); 348 childSetEnabled("Group:",true);
331 childSetText("Group Name",LLStringUtil::null); 349 childSetText("Group Name",LLStringUtil::null);
@@ -388,33 +406,6 @@ void LLPanelPermissions::refresh()
388 childSetEnabled("Object Description",false); 406 childSetEnabled("Object Description",false);
389 } 407 }
390 408
391
392 // Pre-compute object info string
393 S32 prim_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
394 S32 obj_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
395
396 std::string object_info_string;
397 if (1 == obj_count)
398 {
399 object_info_string.assign("1 Object, ");
400 }
401 else
402 {
403 object_info_string = llformat( "%d Objects, ", obj_count);
404 }
405 if (1 == prim_count)
406 {
407 object_info_string.append("1 Primitive");
408 }
409 else
410 {
411 std::string buffer;
412 buffer = llformat( "%d Primitives", prim_count);
413 object_info_string.append(buffer);
414 }
415 childSetText("prim info",object_info_string);
416 childSetEnabled("prim info",true);
417
418 S32 total_sale_price = 0; 409 S32 total_sale_price = 0;
419 S32 individual_sale_price = 0; 410 S32 individual_sale_price = 0;
420 BOOL is_for_sale_mixed = FALSE; 411 BOOL is_for_sale_mixed = FALSE;
@@ -865,6 +856,16 @@ void LLPanelPermissions::onClickOwner(void *data)
865 } 856 }
866} 857}
867 858
859void LLPanelPermissions::onClickLastOwner(void *data)
860{
861 LLPanelPermissions *self = (LLPanelPermissions *)data;
862
863 if ( self->mLastOwnerID.notNull() )
864 {
865 LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID);
866 }
867}
868
868void LLPanelPermissions::onClickGroup(void* data) 869void LLPanelPermissions::onClickGroup(void* data)
869{ 870{
870 LLPanelPermissions* panelp = (LLPanelPermissions*)data; 871 LLPanelPermissions* panelp = (LLPanelPermissions*)data;
diff --git a/linden/indra/newview/llpanelpermissions.h b/linden/indra/newview/llpanelpermissions.h
index 3b73254..57339ed 100644
--- a/linden/indra/newview/llpanelpermissions.h
+++ b/linden/indra/newview/llpanelpermissions.h
@@ -68,6 +68,7 @@ protected:
68 static void onClickRelease(void*); 68 static void onClickRelease(void*);
69 static void onClickCreator(void*); 69 static void onClickCreator(void*);
70 static void onClickOwner(void*); 70 static void onClickOwner(void*);
71 static void onClickLastOwner(void*);
71 static void onClickGroup(void*); 72 static void onClickGroup(void*);
72 static void cbGroupID(LLUUID group_id, void* userdata); 73 static void cbGroupID(LLUUID group_id, void* userdata);
73 static void onClickDeedToGroup(void*); 74 static void onClickDeedToGroup(void*);
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
index d9b51b1..411eec3 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
@@ -386,20 +386,36 @@
386 height="20" label="Profile..." label_selected="Profile..." left_delta="94" 386 height="20" label="Profile..." label_selected="Profile..." left_delta="94"
387 mouse_opaque="true" name="button owner profile" scale_image="TRUE" 387 mouse_opaque="true" name="button owner profile" scale_image="TRUE"
388 width="78" /> 388 width="78" />
389 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
390 bottom_delta="-20" drop_shadow_visible="true" follows="left|top"
391 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
392 mouse_opaque="true" name="LastOwner:" v_pad="0" width="78">
393 Last Owner:
394 </text>
395 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
396 bottom_delta="0" drop_shadow_visible="true" follows="left|top"
397 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
398 mouse_opaque="true" name="Last Owner Name" v_pad="0" width="88">
399 Thrax Linden
400 </text>
401 <button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
402 height="20" label="Profile..." label_selected="Profile..." left_delta="94"
403 mouse_opaque="true" name="button last owner profile" scale_image="TRUE"
404 width="78" />
389 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 405 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
390 bottom="-106" drop_shadow_visible="true" follows="left|top" 406 bottom="-126" drop_shadow_visible="true" follows="left|top"
391 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" 407 font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
392 mouse_opaque="true" name="Group:" v_pad="0" width="78"> 408 mouse_opaque="true" name="Group:" v_pad="0" width="78">
393 Group: 409 Group:
394 </text> 410 </text>
395 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 411 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
396 bottom="-106" drop_shadow_visible="true" follows="left|top" 412 bottom="-126" drop_shadow_visible="true" follows="left|top"
397 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78" 413 font="SansSerifSmall" h_pad="0" halign="left" height="16" left_delta="78"
398 mouse_opaque="true" name="Group Name Proxy" v_pad="0" visible="false" 414 mouse_opaque="true" name="Group Name Proxy" v_pad="0" visible="false"
399 width="88"> 415 width="88">
400 The Lindens 416 The Lindens
401 </text> 417 </text>
402 <button bottom="-106" follows="top|right" font="SansSerifSmall" halign="center" 418 <button bottom="-126" follows="top|right" font="SansSerifSmall" halign="center"
403 height="20" label="Set..." label_selected="Set..." left_delta="94" 419 height="20" label="Set..." label_selected="Set..." left_delta="94"
404 mouse_opaque="true" name="button set group" scale_image="TRUE" width="78" /> 420 mouse_opaque="true" name="button set group" scale_image="TRUE" width="78" />
405 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 421 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
@@ -425,7 +441,7 @@
425 <string name="text deed"> 441 <string name="text deed">
426 Deed 442 Deed
427 </string> 443 </string>
428 <button bottom="-186" follows="top|right" font="SansSerifSmall" halign="center" 444 <button bottom_delta="0" follows="top|right" font="SansSerifSmall" halign="center"
429 height="20" label="Deed..." label_selected="Deed..." left_delta="172" 445 height="20" label="Deed..." label_selected="Deed..." left_delta="172"
430 mouse_opaque="true" name="button deed" scale_image="TRUE" 446 mouse_opaque="true" name="button deed" scale_image="TRUE"
431 tool_tip="Group shared objects can be deeded by a group officer." 447 tool_tip="Group shared objects can be deeded by a group officer."