diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2009-10-19 02:17:01 +0000 |
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-19 02:17:01 +0000 |
| commit | ea1bfae838c59e24ec1a962f7d015d609b63d083 (patch) | |
| tree | 4fb1bc94522313df13a6d329cd8fef29d099a46d /indra/newview/llpanelgroup.cpp | |
| parent | 8103710c054ec6ea4a46f9732e569e543691184b (diff) | |
Merging revisions 2070-2084 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0, respecting ancestry
* Bugs: EXT-792 EXT-1519 EXT-1514 EXT-1245 EXT-1600 EXT-1535 EXT-1174 EXT-1241
* Dev: EXT-1271 EXT-1601 EXT-1154
Diffstat (limited to 'indra/newview/llpanelgroup.cpp')
| -rw-r--r-- | indra/newview/llpanelgroup.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 5ed7821b1b..4708d7ba36 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -309,18 +309,31 @@ void LLPanelGroup::update(LLGroupChange gc) { childSetValue("group_name", gdatap->mName); + LLButton* btn_join = getChild<LLButton>("btn_join"); + LLUICtrl* join_text = getChild<LLUICtrl>("join_cost_text"); + LLGroupData agent_gdatap; bool is_member = gAgent.getGroupData(mID,agent_gdatap); - LLButton* btn_join = getChild<LLButton>("btn_join"); bool join_btn_visible = !is_member && gdatap->mOpenEnrollment; + btn_join->setVisible(join_btn_visible); + join_text->setVisible(join_btn_visible); + if(join_btn_visible) { LLStringUtil::format_map_t string_args; - string_args["[AMOUNT]"] = llformat("%d", gdatap->mMembershipFee); - std::string fee_buff = getString("group_join_btn", string_args); - btn_join->setLabelSelected(fee_buff); - btn_join->setLabelUnselected(fee_buff); + std::string fee_buff; + if(gdatap->mMembershipFee) + { + string_args["[AMOUNT]"] = llformat("%d", gdatap->mMembershipFee); + fee_buff = getString("group_join_btn", string_args); + + } + else + { + fee_buff = getString("group_join_free", string_args); + } + childSetValue("join_cost_text",fee_buff); } } } |
