summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llgroupactions.cpp11
-rw-r--r--indra/newview/llpanelgroup.cpp21
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml18
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_general.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml8
5 files changed, 50 insertions, 14 deletions
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 5db8424b99..1cdac686d7 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -366,7 +366,16 @@ void LLGroupActions::processLeaveGroupDataResponse(const LLUUID group_id)
args["GROUP"] = gdatap->mName;
LLSD payload;
payload["group_id"] = group_id;
- LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
+ if (gdatap->mMembershipFee > 0)
+ {
+ args["COST"] = gdatap->mMembershipFee;
+ LLNotificationsUtil::add("GroupLeaveConfirmMember", args, payload, onLeaveGroup);
+ }
+ else
+ {
+ LLNotificationsUtil::add("GroupLeaveConfirmMemberNoFee", args, payload, onLeaveGroup);
+ }
+
}
// static
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 57742f16a7..0ab0d85c78 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -273,8 +273,15 @@ void LLPanelGroup::onBtnGroupChatClicked(void* user_data)
void LLPanelGroup::onBtnJoin()
{
- LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
- LLGroupActions::join(mID);
+ if (LLGroupActions::isInGroup(mID))
+ {
+ LLGroupActions::leave(mID);
+ }
+ else
+ {
+ LL_DEBUGS() << "joining group: " << mID << LL_ENDL;
+ LLGroupActions::join(mID);
+ }
}
void LLPanelGroup::changed(LLGroupChange gc)
@@ -312,12 +319,17 @@ void LLPanelGroup::update(LLGroupChange gc)
LLGroupData agent_gdatap;
bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlikeWithoutAdminMenuFakery();
- bool join_btn_visible = !is_member && gdatap->mOpenEnrollment;
+ bool join_btn_visible = is_member || gdatap->mOpenEnrollment;
mButtonJoin->setVisible(join_btn_visible);
mJoinText->setVisible(join_btn_visible);
- if(join_btn_visible)
+ if (is_member)
+ {
+ mJoinText->setValue(getString("group_member"));
+ mButtonJoin->setLabel(getString("leave_txt"));
+ }
+ else if(join_btn_visible)
{
LLStringUtil::format_map_t string_args;
std::string fee_buff;
@@ -332,6 +344,7 @@ void LLPanelGroup::update(LLGroupChange gc)
fee_buff = getString("group_join_free", string_args);
}
mJoinText->setValue(fee_buff);
+ mButtonJoin->setLabel(getString("join_txt"));
}
}
}
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 5115bcb27f..7b1449ea92 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4399,8 +4399,22 @@ Are you sure you want to return the selected objects to their owners? Transferab
icon="alert.tga"
name="GroupLeaveConfirmMember"
type="alert">
-You are currently a member of the group &lt;nolink&gt;[GROUP]&lt;/nolink&gt;.
-Leave Group?
+Leave the group &apos;&lt;nolink&gt;[GROUP]&lt;/nolink&gt;&apos;?
+Currently, the fee to join this &quot;group&quot; is L$ [COST].
+ <tag>group</tag>
+ <tag>confirm</tag>
+ <usetemplate
+ name="okcancelbuttons"
+ notext="Cancel"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alert.tga"
+ name="GroupLeaveConfirmMemberNoFee"
+ type="alert">
+Leave the group &apos;&lt;nolink&gt;[GROUP]&lt;/nolink&gt;&apos;?
+There is currently no fee to join this group.
<tag>group</tag>
<tag>confirm</tag>
<usetemplate
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 5eafb5cdf1..472eb319bb 100644
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -65,7 +65,7 @@ Hover your mouse over the options for more help.
width="168" />
<text
font="SansSerifMedium"
- text_color="EmphasisColor"
+ text_color="white"
type="string"
follows="left|top"
height="16"
@@ -75,14 +75,14 @@ Hover your mouse over the options for more help.
top_pad="10"
visible="true"
width="190">
- Free
+ No charge to join
</text>
<button
follows="left|top"
left_delta="0"
top_pad="6"
height="23"
- label="JOIN NOW!"
+ label="Join group"
name="btn_join"
visible="true"
width="120" />
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 05de249d22..d2b0eb4b7c 100644
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -22,10 +22,10 @@ background_visible="true"
name="group_join_btn">
Join (L$[AMOUNT])
</panel.string>
- <panel.string
- name="group_join_free">
- Free
- </panel.string>
+ <panel.string name="group_join_free">No charge to join</panel.string>
+ <panel.string name="group_member">You are a member</panel.string>
+ <panel.string name="join_txt">Join group</panel.string>
+ <panel.string name="leave_txt">Leave</panel.string>
<panel
name="group_info_top"
follows="top|left"