From e2347651e975ccd4437c14ca8b4996863187e1de Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Mon, 25 May 2015 15:40:15 -0400 Subject: [PATCH] I dunno what this is... Code clean up? Sure. --- indra/newview/llimpanel.cpp | 20 ++------------------ indra/newview/llpanelavatar.cpp | 5 +++-- indra/newview/lltoolbrush.cpp | 2 +- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index e6c8787e5..4ff0c6efb 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1069,28 +1069,12 @@ void LLFloaterIMPanel::onInputEditorKeystroke(LLLineEditor* caller) setTyping(!caller->getText().empty()); } +void leave_group_chat(const LLUUID& from_id, const LLUUID& session_id); void LLFloaterIMPanel::onClose(bool app_quitting) { setTyping(false); - if(mSessionUUID.notNull()) - { - std::string name; - gAgent.buildFullname(name); - pack_instant_message( - gMessageSystem, - gAgent.getID(), - FALSE, - gAgent.getSessionID(), - mOtherParticipantUUID, - name, - LLStringUtil::null, - IM_ONLINE, - IM_SESSION_LEAVE, - mSessionUUID); - gAgent.sendReliableMessage(); - } - gIMMgr->removeSession(mSessionUUID); + leave_group_chat(mOtherParticipantUUID, mSessionUUID); destroy(); } diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index d8377ffb2..b59fa3adb 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -181,7 +181,7 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType LLStringUtil::format_map_t args; args["[ACCTTYPE]"] = LLAvatarPropertiesProcessor::accountType(pAvatarData); args["[PAYMENTINFO]"] = LLAvatarPropertiesProcessor::paymentInfo(pAvatarData); - args["[AGEVERIFICATION]"] = " "; + args["[AGEVERIFICATION]"] = LLStringUtil::null; getChild("acct")->setValue(getString("CaptionTextAcctInfo", args)); @@ -192,8 +192,9 @@ void LLPanelAvatarSecondLife::processProperties(void* data, EAvatarProcessorType using namespace boost::gregorian; int year, month, day; sscanf(pAvatarData->born_on.c_str(),"%d/%d/%d", &month, &day, &year); + date birthday(year, month, day), today(day_clock::local_day()); std::ostringstream born_on; - born_on << pAvatarData->born_on << " (" << day_clock::local_day() - date(year, month, day) << ")"; + born_on << pAvatarData->born_on << " (" << today - birthday << ')'; childSetValue("born", born_on.str()); } diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp index 5049b0644..64d5a24ee 100644 --- a/indra/newview/lltoolbrush.cpp +++ b/indra/newview/lltoolbrush.cpp @@ -690,7 +690,7 @@ bool LLToolBrushLand::canTerraformParcel(LLViewerRegion* regionp) const if (selected_parcel) { BOOL owner_release = LLViewerParcelMgr::isParcelOwnedByAgent(selected_parcel, GP_LAND_ALLOW_EDIT_LAND); - is_terraform_allowed = ( gAgent.canManageEstate() || (selected_parcel->getOwnerID() == regionp->getOwner()) || owner_release); + is_terraform_allowed = (selected_parcel->getAllowTerraform() || gAgent.canManageEstate() || (selected_parcel->getOwnerID() == regionp->getOwner()) || owner_release); } return is_terraform_allowed;