diff options
author | McCabe Maxsted | 2009-10-18 17:58:27 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-10-18 17:58:27 -0700 |
commit | e4b0e7c82d670081c071d8a3da31b5ec407b8e07 (patch) | |
tree | 9410962bbb582eedbec448139e217f2714050777 /linden/indra/newview/llpanelpermissions.cpp | |
parent | Started 1.3.0 branch (diff) | |
parent | Updated and added some Linux libs. (diff) | |
download | meta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.zip meta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.tar.gz meta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.tar.bz2 meta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.tar.xz |
Merged working branch of 1.2 into LL 1.23 merge
Diffstat (limited to 'linden/indra/newview/llpanelpermissions.cpp')
-rw-r--r-- | linden/indra/newview/llpanelpermissions.cpp | 67 |
1 files changed, 63 insertions, 4 deletions
diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index da8c9a9..0cb5b9e 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp | |||
@@ -85,6 +85,7 @@ BOOL LLPanelPermissions::postBuild() | |||
85 | 85 | ||
86 | 86 | ||
87 | this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this); | 87 | this->childSetAction("button owner profile",LLPanelPermissions::onClickOwner,this); |
88 | this->childSetAction("button last owner profile",LLPanelPermissions::onClickLastOwner,this); | ||
88 | this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this); | 89 | this->childSetAction("button creator profile",LLPanelPermissions::onClickCreator,this); |
89 | 90 | ||
90 | this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this); | 91 | this->childSetAction("button set group",LLPanelPermissions::onClickGroup,this); |
@@ -178,6 +179,11 @@ void LLPanelPermissions::refresh() | |||
178 | childSetEnabled("Owner Name",false); | 179 | childSetEnabled("Owner Name",false); |
179 | childSetEnabled("button owner profile",false); | 180 | childSetEnabled("button owner profile",false); |
180 | 181 | ||
182 | childSetEnabled("Last Owner:",false); | ||
183 | childSetText("Last Owner Name",LLStringUtil::null); | ||
184 | childSetEnabled("Last Owner Name",false); | ||
185 | childSetEnabled("button last owner profile",false); | ||
186 | |||
181 | childSetEnabled("Group:",false); | 187 | childSetEnabled("Group:",false); |
182 | childSetText("Group Name",LLStringUtil::null); | 188 | childSetText("Group Name",LLStringUtil::null); |
183 | childSetEnabled("Group Name",false); | 189 | childSetEnabled("Group Name",false); |
@@ -297,6 +303,8 @@ void LLPanelPermissions::refresh() | |||
297 | owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); | 303 | owners_identical = LLSelectMgr::getInstance()->selectGetOwner(mOwnerID, owner_name); |
298 | 304 | ||
299 | // llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; | 305 | // llinfos << "owners_identical " << (owners_identical ? "TRUE": "FALSE") << llendl; |
306 | std::string last_owner_name; | ||
307 | LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); | ||
300 | 308 | ||
301 | if (mOwnerID.isNull()) | 309 | if (mOwnerID.isNull()) |
302 | { | 310 | { |
@@ -307,8 +315,8 @@ void LLPanelPermissions::refresh() | |||
307 | else | 315 | else |
308 | { | 316 | { |
309 | // Display last owner if public | 317 | // Display last owner if public |
310 | std::string last_owner_name; | 318 | //std::string last_owner_name; |
311 | LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); | 319 | //LLSelectMgr::getInstance()->selectGetLastOwner(mLastOwnerID, last_owner_name); |
312 | 320 | ||
313 | // It should never happen that the last owner is null and the owner | 321 | // It should never happen that the last owner is null and the owner |
314 | // is null, but it seems to be a bug in the simulator right now. JC | 322 | // is null, but it seems to be a bug in the simulator right now. JC |
@@ -320,9 +328,44 @@ void LLPanelPermissions::refresh() | |||
320 | } | 328 | } |
321 | } | 329 | } |
322 | 330 | ||
331 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
332 | bool fRlvEnableOwner = true; | ||
333 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) | ||
334 | { | ||
335 | // Only filter the owner name if: the selection is all owned by the same avie and not group owned | ||
336 | if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) ) | ||
337 | { | ||
338 | owner_name = gRlvHandler.getAnonym(owner_name); | ||
339 | fRlvEnableOwner = false; | ||
340 | } | ||
341 | } | ||
342 | // [/RLVa:KB] | ||
343 | |||
323 | childSetText("Owner Name",owner_name); | 344 | childSetText("Owner Name",owner_name); |
324 | childSetEnabled("Owner Name",TRUE); | 345 | childSetEnabled("Owner Name",TRUE); |
325 | childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); | 346 | // childSetEnabled("button owner profile",owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); |
347 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | ||
348 | childSetEnabled("button owner profile", | ||
349 | fRlvEnableOwner && owners_identical && (mOwnerID.notNull() || LLSelectMgr::getInstance()->selectIsGroupOwned())); | ||
350 | // [/RLVa:KB] | ||
351 | |||
352 | //if (owner_name != last_owner_name) | ||
353 | // [RLVa:KB] | ||
354 | if ( (owner_name != last_owner_name) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) | ||
355 | // [/RLVa:KB] | ||
356 | { | ||
357 | childSetEnabled("Last Owner:", TRUE); | ||
358 | childSetText("Last Owner Name", last_owner_name); | ||
359 | childSetEnabled("Last Owner Name", TRUE); | ||
360 | childSetEnabled("button last owner profile", TRUE); | ||
361 | } | ||
362 | else | ||
363 | { | ||
364 | childSetEnabled("Last Owner:", FALSE); | ||
365 | childSetText("Last Owner Name", LLStringUtil::null); | ||
366 | childSetEnabled("Last Owner Name", FALSE); | ||
367 | childSetEnabled("button last owner profile", FALSE); | ||
368 | } | ||
326 | 369 | ||
327 | // update group text field | 370 | // update group text field |
328 | childSetEnabled("Group:",true); | 371 | childSetEnabled("Group:",true); |
@@ -839,7 +882,23 @@ void LLPanelPermissions::onClickOwner(void *data) | |||
839 | } | 882 | } |
840 | else | 883 | else |
841 | { | 884 | { |
842 | LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | 885 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) |
886 | if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
887 | { | ||
888 | LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | ||
889 | } | ||
890 | // [/RLVa:KB] | ||
891 | // LLFloaterAvatarInfo::showFromObject(self->mOwnerID); | ||
892 | } | ||
893 | } | ||
894 | |||
895 | void LLPanelPermissions::onClickLastOwner(void *data) | ||
896 | { | ||
897 | LLPanelPermissions *self = (LLPanelPermissions *)data; | ||
898 | |||
899 | if ( self->mLastOwnerID.notNull() ) | ||
900 | { | ||
901 | LLFloaterAvatarInfo::showFromObject(self->mLastOwnerID); | ||
843 | } | 902 | } |
844 | } | 903 | } |
845 | 904 | ||