From 482eefcba94dac0e6a0e6f9985f582e724b02523 Mon Sep 17 00:00:00 2001
From: Ychebotarev ProductEngine <ychebotarev@productengine.com>
Date: Thu, 4 Feb 2010 12:39:13 +0200
Subject: [PATCH] fix for task EXT-4750 Disable "Join" dialog for free groups
 also add group name to notification - more informative...

--HG--
branch : product-engine
---
 indra/newview/llgroupactions.cpp                    |  7 ++++++-
 .../newview/skins/default/xui/en/notifications.xml  | 13 +++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 3653371d766..00e2365ffde 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -161,12 +161,17 @@ void LLGroupActions::join(const LLUUID& group_id)
 		S32 cost = gdatap->mMembershipFee;
 		LLSD args;
 		args["COST"] = llformat("%d", cost);
+		args["NAME"] = gdatap->mName;
 		LLSD payload;
 		payload["group_id"] = group_id;
 
 		if (can_afford_transaction(cost))
 		{
-			LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, onJoinGroup);
+			if(cost > 0)
+				LLNotificationsUtil::add("JoinGroupCanAfford", args, payload, onJoinGroup);
+			else
+				LLNotificationsUtil::add("JoinGroupNoCost", args, payload, onJoinGroup);
+				
 		}
 		else
 		{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 636db2b59b0..7cc4af53f83 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -411,6 +411,19 @@ Do you wish to proceed?
      yestext="Join"/>
   </notification>
 
+  <notification
+   icon="alertmodal.tga"
+   name="JoinGroupNoCost"
+   type="alertmodal">
+You are Joining group [NAME].
+Do you wish to proceed?
+    <usetemplate
+     name="okcancelbuttons"
+     notext="Cancel"
+     yestext="Join"/>
+  </notification>
+
+
   <notification
    icon="alertmodal.tga"
    name="JoinGroupCannotAfford"
-- 
GitLab