I dunno what this is... Code clean up? Sure.

This commit is contained in:
Inusaito Sayori
2015-05-25 15:40:15 -04:00
parent dcb349d55d
commit e2347651e9
3 changed files with 6 additions and 21 deletions

View File

@@ -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();
}

View File

@@ -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<LLUICtrl>("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());
}

View File

@@ -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;