aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupnotices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelgroupnotices.cpp')
-rw-r--r--linden/indra/newview/llpanelgroupnotices.cpp43
1 files changed, 19 insertions, 24 deletions
diff --git a/linden/indra/newview/llpanelgroupnotices.cpp b/linden/indra/newview/llpanelgroupnotices.cpp
index 5fdfdba..ef57aff 100644
--- a/linden/indra/newview/llpanelgroupnotices.cpp
+++ b/linden/indra/newview/llpanelgroupnotices.cpp
@@ -129,7 +129,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
129 { 129 {
130 // check if inside 130 // check if inside
131 //LLRect parent_rect = mParentView->getRect(); 131 //LLRect parent_rect = mParentView->getRect();
132 //mRect.set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0); 132 //getRect().set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0);
133 handled = TRUE; 133 handled = TRUE;
134 134
135 // check the type 135 // check the type
@@ -229,67 +229,62 @@ BOOL LLPanelGroupNotices::postBuild()
229{ 229{
230 bool recurse = true; 230 bool recurse = true;
231 231
232 mNoticesList = (LLScrollListCtrl*)getChildByName("notice_list",recurse); 232 mNoticesList = getChild<LLScrollListCtrl>("notice_list",recurse);
233 mNoticesList->setCommitOnSelectionChange(TRUE); 233 mNoticesList->setCommitOnSelectionChange(TRUE);
234 mNoticesList->setCommitCallback(onSelectNotice); 234 mNoticesList->setCommitCallback(onSelectNotice);
235 mNoticesList->setCallbackUserData(this); 235 mNoticesList->setCallbackUserData(this);
236 236
237 mBtnNewMessage = (LLButton*)getChildByName("create_new_notice",recurse); 237 mBtnNewMessage = getChild<LLButton>("create_new_notice",recurse);
238 mBtnNewMessage->setClickedCallback(onClickNewMessage); 238 mBtnNewMessage->setClickedCallback(onClickNewMessage);
239 mBtnNewMessage->setCallbackUserData(this); 239 mBtnNewMessage->setCallbackUserData(this);
240 mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND)); 240 mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND));
241 241
242 mBtnGetPastNotices = (LLButton*)getChildByName("refresh_notices",recurse); 242 mBtnGetPastNotices = getChild<LLButton>("refresh_notices",recurse);
243 mBtnGetPastNotices->setClickedCallback(onClickRefreshNotices); 243 mBtnGetPastNotices->setClickedCallback(onClickRefreshNotices);
244 mBtnGetPastNotices->setCallbackUserData(this); 244 mBtnGetPastNotices->setCallbackUserData(this);
245 245
246 // Create 246 // Create
247 mCreateSubject = (LLLineEditor*)getChildByName("create_subject",recurse); 247 mCreateSubject = getChild<LLLineEditor>("create_subject",recurse);
248 mCreateMessage = (LLTextEditor*)getChildByName("create_message",recurse); 248 mCreateMessage = getChild<LLTextEditor>("create_message",recurse);
249 249
250 mCreateInventoryName = (LLLineEditor*)getChildByName("create_inventory_name",recurse); 250 mCreateInventoryName = getChild<LLLineEditor>("create_inventory_name",recurse);
251 mCreateInventoryName->setTabStop(FALSE); 251 mCreateInventoryName->setTabStop(FALSE);
252 mCreateInventoryName->setEnabled(FALSE); 252 mCreateInventoryName->setEnabled(FALSE);
253 253
254 mCreateInventoryIcon = (LLIconCtrl*)getChildByName("create_inv_icon",recurse); 254 mCreateInventoryIcon = getChild<LLIconCtrl>("create_inv_icon",recurse);
255 mCreateInventoryIcon->setVisible(FALSE); 255 mCreateInventoryIcon->setVisible(FALSE);
256 256
257 mBtnSendMessage = (LLButton*)getChildByName("send_notice",recurse); 257 mBtnSendMessage = getChild<LLButton>("send_notice",recurse);
258 mBtnSendMessage->setClickedCallback(onClickSendMessage); 258 mBtnSendMessage->setClickedCallback(onClickSendMessage);
259 mBtnSendMessage->setCallbackUserData(this); 259 mBtnSendMessage->setCallbackUserData(this);
260 260
261 mBtnRemoveAttachment = (LLButton*)getChildByName("remove_attachment",recurse); 261 mBtnRemoveAttachment = getChild<LLButton>("remove_attachment",recurse);
262 mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment); 262 mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment);
263 mBtnRemoveAttachment->setCallbackUserData(this); 263 mBtnRemoveAttachment->setCallbackUserData(this);
264 mBtnRemoveAttachment->setEnabled(FALSE); 264 mBtnRemoveAttachment->setEnabled(FALSE);
265 265
266 // View 266 // View
267 mViewSubject = (LLLineEditor*)getChildByName("view_subject",recurse); 267 mViewSubject = getChild<LLLineEditor>("view_subject",recurse);
268 mViewMessage = (LLTextEditor*)getChildByName("view_message",recurse); 268 mViewMessage = getChild<LLTextEditor>("view_message",recurse);
269 269
270 mViewInventoryName = (LLLineEditor*)getChildByName("view_inventory_name",recurse); 270 mViewInventoryName = getChild<LLLineEditor>("view_inventory_name",recurse);
271 mViewInventoryName->setTabStop(FALSE); 271 mViewInventoryName->setTabStop(FALSE);
272 mViewInventoryName->setEnabled(FALSE); 272 mViewInventoryName->setEnabled(FALSE);
273 273
274 mViewInventoryIcon = (LLIconCtrl*)getChildByName("view_inv_icon",recurse); 274 mViewInventoryIcon = getChild<LLIconCtrl>("view_inv_icon",recurse);
275 mViewInventoryIcon->setVisible(FALSE); 275 mViewInventoryIcon->setVisible(FALSE);
276 276
277 mBtnOpenAttachment = (LLButton*)getChildByName("open_attachment",recurse); 277 mBtnOpenAttachment = getChild<LLButton>("open_attachment",recurse);
278 mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment); 278 mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment);
279 mBtnOpenAttachment->setCallbackUserData(this); 279 mBtnOpenAttachment->setCallbackUserData(this);
280 280
281 LLTextBox *txt = (LLTextBox*) getChildByName("no_notices_text",false); 281 mNoNoticesStr = getString("no_notices_text");
282 if (txt)
283 {
284 mNoNoticesStr = txt->getText();
285 removeChild(txt, TRUE);
286 }
287 282
288 mPanelCreateNotice = (LLPanel*) getChildByName("panel_create_new_notice",recurse); 283 mPanelCreateNotice = getChild<LLPanel>("panel_create_new_notice",recurse);
289 mPanelViewNotice = (LLPanel*) getChildByName("panel_view_past_notice",recurse); 284 mPanelViewNotice = getChild<LLPanel>("panel_view_past_notice",recurse);
290 285
291 // Must be in front of all other UI elements. 286 // Must be in front of all other UI elements.
292 LLPanel* dtv = (LLPanel*)getChildByName("drop_target",recurse); 287 LLPanel* dtv = getChild<LLPanel>("drop_target",recurse);
293 LLGroupDropTarget* target = new LLGroupDropTarget("drop_target", 288 LLGroupDropTarget* target = new LLGroupDropTarget("drop_target",
294 dtv->getRect(), 289 dtv->getRect(),
295 this, mGroupID); 290 this, mGroupID);