aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelpermissions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelpermissions.cpp')
-rw-r--r--linden/indra/newview/llpanelpermissions.cpp92
1 files changed, 58 insertions, 34 deletions
diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp
index c430922..24bbab6 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
@@ -322,9 +327,39 @@ void LLPanelPermissions::refresh()
322 } 327 }
323 } 328 }
324 329
330// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
331 bool fRlvEnableOwner = true;
332 if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
333 {
334 // Only filter the owner name if: the selection is all owned by the same avie and not group owned
335 if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) )
336 {
337 owner_name = gRlvHandler.getAnonym(owner_name);
338 fRlvEnableOwner = false;
339 }
340 }
341// [/RLVa:KB]
342
325 childSetText("Owner Name",owner_name); 343 childSetText("Owner Name",owner_name);
326 childSetEnabled("Owner Name",TRUE); 344 childSetEnabled("Owner Name",TRUE);
327 childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); 345// childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
346// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
347 childSetEnabled("button owner profile",
348 fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned()));
349// [/RLVa:KB]
350
351 if (owner_name != last_owner_name)
352 {
353 childSetText("Last Owner Name", last_owner_name);
354 childSetEnabled("Last Owner Name", TRUE);
355 childSetEnabled("button last owner profile", TRUE);
356 }
357 else
358 {
359 childSetText("Last Owner Name", LLStringUtil::null);
360 childSetEnabled("Last Owner Name", FALSE);
361 childSetEnabled("button last owner profile", FALSE);
362 }
328 363
329 // update group text field 364 // update group text field
330 childSetEnabled("Group:",true); 365 childSetEnabled("Group:",true);
@@ -388,33 +423,6 @@ void LLPanelPermissions::refresh()
388 childSetEnabled("Object Description",false); 423 childSetEnabled("Object Description",false);
389 } 424 }
390 425
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; 426 S32 total_sale_price = 0;
419 S32 individual_sale_price = 0; 427 S32 individual_sale_price = 0;
420 BOOL is_for_sale_mixed = FALSE; 428 BOOL is_for_sale_mixed = FALSE;
@@ -861,7 +869,23 @@ void LLPanelPermissions::onClickOwner(void *data)
861 } 869 }
862 else 870 else
863 { 871 {
864 LLFloaterAvatarInfo::showFromObject(self->mOwnerID); 872// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
873 if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
874 {
875 LLFloaterAvatarInfo::showFromObject(self->mOwnerID);
876 }
877// [/RLVa:KB]
878// LLFloaterAvatarInfo::showFromObject(self->mOwnerID);
879 }
880}
881
882void LLPanelPermissions::onClickLastOwner(void *data)
883{
884 LLPanelPermissions *self = (LLPanelPermissions *)data;
885
886 if ( self->mLastOwnerID.notNull() )
887 {
888 LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID);
865 } 889 }
866} 890}
867 891