aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupgeneral.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r--linden/indra/newview/llpanelgroupgeneral.cpp52
1 files changed, 19 insertions, 33 deletions
diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp
index 1ecc2e5..e2572f1 100644
--- a/linden/indra/newview/llpanelgroupgeneral.cpp
+++ b/linden/indra/newview/llpanelgroupgeneral.cpp
@@ -99,10 +99,10 @@ BOOL LLPanelGroupGeneral::postBuild()
99 bool recurse = true; 99 bool recurse = true;
100 100
101 // General info 101 // General info
102 mGroupNameEditor = (LLLineEditor*) getChildByName("group_name_editor", recurse); 102 mGroupNameEditor = getChild<LLLineEditor>("group_name_editor", recurse);
103 mGroupName = (LLTextBox*) getChildByName("group_name", recurse); 103 mGroupName = getChild<LLTextBox>("group_name", recurse);
104 104
105 mInsignia = (LLTextureCtrl*) getChildByName("insignia", recurse); 105 mInsignia = getChild<LLTextureCtrl>("insignia", recurse);
106 if (mInsignia) 106 if (mInsignia)
107 { 107 {
108 mInsignia->setCommitCallback(onCommitAny); 108 mInsignia->setCommitCallback(onCommitAny);
@@ -110,7 +110,7 @@ BOOL LLPanelGroupGeneral::postBuild()
110 mDefaultIconID = mInsignia->getImageAssetID(); 110 mDefaultIconID = mInsignia->getImageAssetID();
111 } 111 }
112 112
113 mEditCharter = (LLTextEditor*) getChildByName("charter", recurse); 113 mEditCharter = getChild<LLTextEditor>("charter", recurse);
114 if(mEditCharter) 114 if(mEditCharter)
115 { 115 {
116 mEditCharter->setCommitCallback(onCommitAny); 116 mEditCharter->setCommitCallback(onCommitAny);
@@ -119,21 +119,21 @@ BOOL LLPanelGroupGeneral::postBuild()
119 mEditCharter->setCallbackUserData(this); 119 mEditCharter->setCallbackUserData(this);
120 } 120 }
121 121
122 mBtnJoinGroup = (LLButton*) getChildByName("join_button", recurse); 122 mBtnJoinGroup = getChild<LLButton>("join_button", recurse);
123 if ( mBtnJoinGroup ) 123 if ( mBtnJoinGroup )
124 { 124 {
125 mBtnJoinGroup->setClickedCallback(onClickJoin); 125 mBtnJoinGroup->setClickedCallback(onClickJoin);
126 mBtnJoinGroup->setCallbackUserData(this); 126 mBtnJoinGroup->setCallbackUserData(this);
127 } 127 }
128 128
129 mBtnInfo = (LLButton*) getChildByName("info_button", recurse); 129 mBtnInfo = getChild<LLButton>("info_button", recurse);
130 if ( mBtnInfo ) 130 if ( mBtnInfo )
131 { 131 {
132 mBtnInfo->setClickedCallback(onClickInfo); 132 mBtnInfo->setClickedCallback(onClickInfo);
133 mBtnInfo->setCallbackUserData(this); 133 mBtnInfo->setCallbackUserData(this);
134 } 134 }
135 135
136 LLTextBox* founder = (LLTextBox*) getChildByName("founder_name"); 136 LLTextBox* founder = getChild<LLTextBox>("founder_name");
137 if (founder) 137 if (founder)
138 { 138 {
139 mFounderName = new LLNameBox(founder->getName(),founder->getRect(),LLUUID::null,FALSE,founder->getFont(),founder->getMouseOpaque()); 139 mFounderName = new LLNameBox(founder->getName(),founder->getRect(),LLUUID::null,FALSE,founder->getFont(),founder->getMouseOpaque());
@@ -141,7 +141,7 @@ BOOL LLPanelGroupGeneral::postBuild()
141 addChild(mFounderName); 141 addChild(mFounderName);
142 } 142 }
143 143
144 mListVisibleMembers = (LLNameListCtrl*) getChildByName("visible_members", recurse); 144 mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
145 if (mListVisibleMembers) 145 if (mListVisibleMembers)
146 { 146 {
147 mListVisibleMembers->setDoubleClickCallback(openProfile); 147 mListVisibleMembers->setDoubleClickCallback(openProfile);
@@ -149,14 +149,14 @@ BOOL LLPanelGroupGeneral::postBuild()
149 } 149 }
150 150
151 // Options 151 // Options
152 mCtrlShowInGroupList = (LLCheckBoxCtrl*) getChildByName("show_in_group_list", recurse); 152 mCtrlShowInGroupList = getChild<LLCheckBoxCtrl>("show_in_group_list", recurse);
153 if (mCtrlShowInGroupList) 153 if (mCtrlShowInGroupList)
154 { 154 {
155 mCtrlShowInGroupList->setCommitCallback(onCommitAny); 155 mCtrlShowInGroupList->setCommitCallback(onCommitAny);
156 mCtrlShowInGroupList->setCallbackUserData(this); 156 mCtrlShowInGroupList->setCallbackUserData(this);
157 } 157 }
158 158
159 mCtrlMature = (LLCheckBoxCtrl*) getChildByName("mature", recurse); 159 mCtrlMature = getChild<LLCheckBoxCtrl>("mature", recurse);
160 if (mCtrlMature) 160 if (mCtrlMature)
161 { 161 {
162 mCtrlMature->setCommitCallback(onCommitAny); 162 mCtrlMature->setCommitCallback(onCommitAny);
@@ -164,21 +164,21 @@ BOOL LLPanelGroupGeneral::postBuild()
164 mCtrlMature->setVisible( !gAgent.isTeen() ); 164 mCtrlMature->setVisible( !gAgent.isTeen() );
165 } 165 }
166 166
167 mCtrlOpenEnrollment = (LLCheckBoxCtrl*) getChildByName("open_enrollement", recurse); 167 mCtrlOpenEnrollment = getChild<LLCheckBoxCtrl>("open_enrollement", recurse);
168 if (mCtrlOpenEnrollment) 168 if (mCtrlOpenEnrollment)
169 { 169 {
170 mCtrlOpenEnrollment->setCommitCallback(onCommitAny); 170 mCtrlOpenEnrollment->setCommitCallback(onCommitAny);
171 mCtrlOpenEnrollment->setCallbackUserData(this); 171 mCtrlOpenEnrollment->setCallbackUserData(this);
172 } 172 }
173 173
174 mCtrlEnrollmentFee = (LLCheckBoxCtrl*) getChildByName("check_enrollment_fee", recurse); 174 mCtrlEnrollmentFee = getChild<LLCheckBoxCtrl>("check_enrollment_fee", recurse);
175 if (mCtrlEnrollmentFee) 175 if (mCtrlEnrollmentFee)
176 { 176 {
177 mCtrlEnrollmentFee->setCommitCallback(onCommitEnrollment); 177 mCtrlEnrollmentFee->setCommitCallback(onCommitEnrollment);
178 mCtrlEnrollmentFee->setCallbackUserData(this); 178 mCtrlEnrollmentFee->setCallbackUserData(this);
179 } 179 }
180 180
181 mSpinEnrollmentFee = (LLSpinCtrl*) getChildByName("spin_enrollment_fee", recurse); 181 mSpinEnrollmentFee = getChild<LLSpinCtrl>("spin_enrollment_fee", recurse);
182 if (mSpinEnrollmentFee) 182 if (mSpinEnrollmentFee)
183 { 183 {
184 mSpinEnrollmentFee->setCommitCallback(onCommitAny); 184 mSpinEnrollmentFee->setCommitCallback(onCommitAny);
@@ -194,7 +194,7 @@ BOOL LLPanelGroupGeneral::postBuild()
194 accept_notices = data.mAcceptNotices; 194 accept_notices = data.mAcceptNotices;
195 list_in_profile = data.mListInProfile; 195 list_in_profile = data.mListInProfile;
196 } 196 }
197 mCtrlReceiveNotices = (LLCheckBoxCtrl*) getChildByName("receive_notices", recurse); 197 mCtrlReceiveNotices = getChild<LLCheckBoxCtrl>("receive_notices", recurse);
198 if (mCtrlReceiveNotices) 198 if (mCtrlReceiveNotices)
199 { 199 {
200 mCtrlReceiveNotices->setCommitCallback(onCommitUserOnly); 200 mCtrlReceiveNotices->setCommitCallback(onCommitUserOnly);
@@ -203,7 +203,7 @@ BOOL LLPanelGroupGeneral::postBuild()
203 mCtrlReceiveNotices->setEnabled(data.mID.notNull()); 203 mCtrlReceiveNotices->setEnabled(data.mID.notNull());
204 } 204 }
205 205
206 mCtrlListGroup = (LLCheckBoxCtrl*) getChildByName("list_groups_in_profile", recurse); 206 mCtrlListGroup = getChild<LLCheckBoxCtrl>("list_groups_in_profile", recurse);
207 if (mCtrlListGroup) 207 if (mCtrlListGroup)
208 { 208 {
209 mCtrlListGroup->setCommitCallback(onCommitUserOnly); 209 mCtrlListGroup->setCommitCallback(onCommitUserOnly);
@@ -212,31 +212,17 @@ BOOL LLPanelGroupGeneral::postBuild()
212 mCtrlListGroup->setEnabled(data.mID.notNull()); 212 mCtrlListGroup->setEnabled(data.mID.notNull());
213 } 213 }
214 214
215 mActiveTitleLabel = (LLTextBox*) getChildByName("active_title_label", recurse); 215 mActiveTitleLabel = getChild<LLTextBox>("active_title_label", recurse);
216 216
217 mComboActiveTitle = (LLComboBox*) getChildByName("active_title", recurse); 217 mComboActiveTitle = getChild<LLComboBox>("active_title", recurse);
218 if (mComboActiveTitle) 218 if (mComboActiveTitle)
219 { 219 {
220 mComboActiveTitle->setCommitCallback(onCommitTitle); 220 mComboActiveTitle->setCommitCallback(onCommitTitle);
221 mComboActiveTitle->setCallbackUserData(this); 221 mComboActiveTitle->setCallbackUserData(this);
222 } 222 }
223 223
224 // Extra data 224 mIncompleteMemberDataStr = getString("incomplete_member_data_str");
225 LLTextBox* txt; 225 mConfirmGroupCreateStr = getString("confirm_group_create_str");
226 // Don't recurse for this, since we don't currently have a recursive removeChild()
227 txt = (LLTextBox*)getChildByName("incomplete_member_data_str");
228 if (txt)
229 {
230 mIncompleteMemberDataStr = txt->getText();
231 removeChild(txt, TRUE);
232 }
233
234 txt = (LLTextBox*)getChildByName("confirm_group_create_str");
235 if (txt)
236 {
237 mConfirmGroupCreateStr = txt->getText();
238 removeChild(txt, TRUE);
239 }
240 226
241 // If the group_id is null, then we are creating a new group 227 // If the group_id is null, then we are creating a new group
242 if (mGroupID.isNull()) 228 if (mGroupID.isNull())