diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llpanelgroupgeneral.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r-- | linden/indra/newview/llpanelgroupgeneral.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index a7eac37..bb2c096 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp | |||
@@ -344,7 +344,7 @@ void LLPanelGroupGeneral::onClickJoin(void *userdata) | |||
344 | if (gdatap) | 344 | if (gdatap) |
345 | { | 345 | { |
346 | S32 cost = gdatap->mMembershipFee; | 346 | S32 cost = gdatap->mMembershipFee; |
347 | LLString::format_map_t args; | 347 | LLStringUtil::format_map_t args; |
348 | args["[COST]"] = llformat("%d", cost); | 348 | args["[COST]"] = llformat("%d", cost); |
349 | 349 | ||
350 | if (can_afford_transaction(cost)) | 350 | if (can_afford_transaction(cost)) |
@@ -394,7 +394,7 @@ void LLPanelGroupGeneral::openProfile(void* data) | |||
394 | } | 394 | } |
395 | } | 395 | } |
396 | 396 | ||
397 | bool LLPanelGroupGeneral::needsApply(LLString& mesg) | 397 | bool LLPanelGroupGeneral::needsApply(std::string& mesg) |
398 | { | 398 | { |
399 | mesg = getUIString("group_info_unchanged"); | 399 | mesg = getUIString("group_info_unchanged"); |
400 | return mChanged || mGroupID.isNull(); | 400 | return mChanged || mGroupID.isNull(); |
@@ -432,7 +432,7 @@ void LLPanelGroupGeneral::draw() | |||
432 | } | 432 | } |
433 | } | 433 | } |
434 | 434 | ||
435 | bool LLPanelGroupGeneral::apply(LLString& mesg) | 435 | bool LLPanelGroupGeneral::apply(std::string& mesg) |
436 | { | 436 | { |
437 | BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY); | 437 | BOOL has_power_in_group = gAgent.hasPowerInGroup(mGroupID,GP_GROUP_CHANGE_IDENTITY); |
438 | 438 | ||
@@ -441,9 +441,10 @@ bool LLPanelGroupGeneral::apply(LLString& mesg) | |||
441 | llinfos << "LLPanelGroupGeneral::apply" << llendl; | 441 | llinfos << "LLPanelGroupGeneral::apply" << llendl; |
442 | 442 | ||
443 | // Check to make sure mature has been set | 443 | // Check to make sure mature has been set |
444 | if(mComboMature->getCurrentIndex() == DECLINE_TO_STATE) | 444 | if(mComboMature && |
445 | mComboMature->getCurrentIndex() == DECLINE_TO_STATE) | ||
445 | { | 446 | { |
446 | LLString::format_map_t args; | 447 | LLStringUtil::format_map_t args; |
447 | gViewerWindow->alertXml("SetGroupMature", &callbackConfirmMatureApply, | 448 | gViewerWindow->alertXml("SetGroupMature", &callbackConfirmMatureApply, |
448 | new LLHandle<LLPanel>(getHandle())); | 449 | new LLHandle<LLPanel>(getHandle())); |
449 | return false; | 450 | return false; |
@@ -463,7 +464,7 @@ bool LLPanelGroupGeneral::apply(LLString& mesg) | |||
463 | return false; | 464 | return false; |
464 | } | 465 | } |
465 | 466 | ||
466 | LLString::format_map_t args; | 467 | LLStringUtil::format_map_t args; |
467 | args["[MESSAGE]"] = mConfirmGroupCreateStr; | 468 | args["[MESSAGE]"] = mConfirmGroupCreateStr; |
468 | gViewerWindow->alertXml("GenericAlertYesCancel", args, | 469 | gViewerWindow->alertXml("GenericAlertYesCancel", args, |
469 | createGroupCallback, new LLHandle<LLPanel>(getHandle()) ); | 470 | createGroupCallback, new LLHandle<LLPanel>(getHandle()) ); |
@@ -474,7 +475,8 @@ bool LLPanelGroupGeneral::apply(LLString& mesg) | |||
474 | LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); | 475 | LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); |
475 | if (!gdatap) | 476 | if (!gdatap) |
476 | { | 477 | { |
477 | mesg = "No group data found for group "; | 478 | // *TODO: Translate |
479 | mesg = std::string("No group data found for group "); | ||
478 | mesg.append(mGroupID.asString()); | 480 | mesg.append(mGroupID.asString()); |
479 | return false; | 481 | return false; |
480 | } | 482 | } |
@@ -575,7 +577,7 @@ void LLPanelGroupGeneral::confirmMatureApply(S32 option) | |||
575 | } | 577 | } |
576 | 578 | ||
577 | // If we got here it means they set a valid value | 579 | // If we got here it means they set a valid value |
578 | LLString mesg = ""; | 580 | std::string mesg = ""; |
579 | apply(mesg); | 581 | apply(mesg); |
580 | } | 582 | } |
581 | 583 | ||
@@ -721,7 +723,7 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) | |||
721 | } | 723 | } |
722 | if ( mBtnJoinGroup ) | 724 | if ( mBtnJoinGroup ) |
723 | { | 725 | { |
724 | char fee_buff[20]; /*Flawfinder: ignore*/ | 726 | std::string fee_buff; |
725 | bool visible; | 727 | bool visible; |
726 | 728 | ||
727 | visible = !is_member && gdatap->mOpenEnrollment; | 729 | visible = !is_member && gdatap->mOpenEnrollment; |
@@ -729,9 +731,9 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) | |||
729 | 731 | ||
730 | if ( visible ) | 732 | if ( visible ) |
731 | { | 733 | { |
732 | snprintf(fee_buff, sizeof(fee_buff), "Join (L$%d)", gdatap->mMembershipFee); /* Flawfinder: ignore */ | 734 | fee_buff = llformat( "Join (L$%d)", gdatap->mMembershipFee); |
733 | mBtnJoinGroup->setLabelSelected(std::string(fee_buff)); | 735 | mBtnJoinGroup->setLabelSelected(fee_buff); |
734 | mBtnJoinGroup->setLabelUnselected(std::string(fee_buff)); | 736 | mBtnJoinGroup->setLabelUnselected(fee_buff); |
735 | } | 737 | } |
736 | } | 738 | } |
737 | if ( mBtnInfo ) | 739 | if ( mBtnInfo ) |
@@ -825,7 +827,7 @@ void LLPanelGroupGeneral::updateMembers() | |||
825 | continue; | 827 | continue; |
826 | } | 828 | } |
827 | // Owners show up in bold. | 829 | // Owners show up in bold. |
828 | LLString style = "NORMAL"; | 830 | std::string style = "NORMAL"; |
829 | if ( member->isOwner() ) | 831 | if ( member->isOwner() ) |
830 | { | 832 | { |
831 | style = "BOLD"; | 833 | style = "BOLD"; |