llpanelgroupnotices.cpp
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:18k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. /** 
  2.  * @file llpanelgroupnotices.cpp
  3.  * @brief A panel to display group notices.
  4.  *
  5.  * $LicenseInfo:firstyear=2006&license=viewergpl$
  6.  * 
  7.  * Copyright (c) 2006-2010, Linden Research, Inc.
  8.  * 
  9.  * Second Life Viewer Source Code
  10.  * The source code in this file ("Source Code") is provided by Linden Lab
  11.  * to you under the terms of the GNU General Public License, version 2.0
  12.  * ("GPL"), unless you have obtained a separate licensing agreement
  13.  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  14.  * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15.  * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16.  * 
  17.  * There are special exceptions to the terms and conditions of the GPL as
  18.  * it is applied to this Source Code. View the full text of the exception
  19.  * in the file doc/FLOSS-exception.txt in this software distribution, or
  20.  * online at
  21.  * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22.  * 
  23.  * By copying, modifying or distributing this software, you acknowledge
  24.  * that you have read and understood your obligations described above,
  25.  * and agree to abide by those obligations.
  26.  * 
  27.  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28.  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29.  * COMPLETENESS OR PERFORMANCE.
  30.  * $/LicenseInfo$
  31.  */
  32. #include "llviewerprecompiledheaders.h"
  33. #include "llpanelgroupnotices.h"
  34. #include "llview.h"
  35. #include "llinventory.h"
  36. #include "llviewerinventory.h"
  37. #include "llinventoryfunctions.h"
  38. #include "llinventorymodel.h"
  39. #include "llfloaterinventory.h"
  40. #include "llagent.h"
  41. #include "llagentui.h"
  42. #include "lltooldraganddrop.h"
  43. #include "lllineeditor.h"
  44. #include "lltexteditor.h"
  45. #include "llbutton.h"
  46. #include "lliconctrl.h"
  47. #include "llcheckboxctrl.h"
  48. #include "llscrolllistctrl.h"
  49. #include "llscrolllistitem.h"
  50. #include "lltextbox.h"
  51. #include "lltrans.h"
  52. #include "roles_constants.h"
  53. #include "llviewerwindow.h"
  54. #include "llviewermessage.h"
  55. #include "llnotificationsutil.h"
  56. static LLRegisterPanelClassWrapper<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices");
  57. /////////////////////////
  58. // LLPanelGroupNotices //
  59. /////////////////////////
  60. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61. // Class LLDropTarget
  62. //
  63. // This handy class is a simple way to drop something on another
  64. // view. It handles drop events, always setting itself to the size of
  65. // its parent.
  66. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67. class LLGroupDropTarget : public LLView
  68. {
  69. public:
  70. struct Params : public LLInitParam::Block<Params, LLView::Params>
  71. {
  72. // *NOTE: These parameters logically Mandatory, but are not
  73. // specified in XML files, hence Optional
  74. Optional<LLPanelGroupNotices*> panel;
  75. Optional<LLUUID> group_id;
  76. Params()
  77. : panel("panel"),
  78. group_id("group_id")
  79. {
  80. mouse_opaque(false);
  81. follows.flags(FOLLOWS_ALL);
  82. }
  83. };
  84. LLGroupDropTarget(const Params&);
  85. ~LLGroupDropTarget() {};
  86. void doDrop(EDragAndDropType cargo_type, void* cargo_data);
  87. //
  88. // LLView functionality
  89. virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
  90.    EDragAndDropType cargo_type,
  91.    void* cargo_data,
  92.    EAcceptance* accept,
  93.    std::string& tooltip_msg);
  94. void setPanel (LLPanelGroupNotices* panel) {mGroupNoticesPanel = panel;};
  95. void setGroup (LLUUID group) {mGroupID = group;};
  96. protected:
  97. LLPanelGroupNotices* mGroupNoticesPanel;
  98. LLUUID mGroupID;
  99. };
  100. static LLDefaultChildRegistry::Register<LLGroupDropTarget> r("group_drop_target");
  101. LLGroupDropTarget::LLGroupDropTarget(const LLGroupDropTarget::Params& p) 
  102. : LLView(p),
  103. mGroupNoticesPanel(p.panel),
  104. mGroupID(p.group_id)
  105. {}
  106. void LLGroupDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
  107. {
  108. llinfos << "LLGroupDropTarget::doDrop()" << llendl;
  109. }
  110. BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
  111.  EDragAndDropType cargo_type,
  112.  void* cargo_data,
  113.  EAcceptance* accept,
  114.  std::string& tooltip_msg)
  115. {
  116. BOOL handled = FALSE;
  117. if (!gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND))
  118. {
  119. *accept = ACCEPT_NO;
  120. return TRUE;
  121. }
  122. if(getParent())
  123. {
  124. // check if inside
  125. //LLRect parent_rect = mParentView->getRect();
  126. //getRect().set(0, parent_rect.getHeight(), parent_rect.getWidth(), 0);
  127. handled = TRUE;
  128. // check the type
  129. switch(cargo_type)
  130. {
  131. case DAD_TEXTURE:
  132. case DAD_SOUND:
  133. case DAD_LANDMARK:
  134. case DAD_SCRIPT:
  135. case DAD_OBJECT:
  136. case DAD_NOTECARD:
  137. case DAD_CLOTHING:
  138. case DAD_BODYPART:
  139. case DAD_ANIMATION:
  140. case DAD_GESTURE:
  141. case DAD_CALLINGCARD:
  142. {
  143. LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;
  144. if(gInventory.getItem(inv_item->getUUID())
  145. && LLToolDragAndDrop::isInventoryGroupGiveAcceptable(inv_item))
  146. {
  147. // *TODO: get multiple object transfers working
  148. *accept = ACCEPT_YES_COPY_SINGLE;
  149. if(drop)
  150. {
  151. mGroupNoticesPanel->setItem(inv_item);
  152. }
  153. }
  154. else
  155. {
  156. // It's not in the user's inventory (it's probably
  157. // in an object's contents), so disallow dragging
  158. // it here.  You can't give something you don't
  159. // yet have.
  160. *accept = ACCEPT_NO;
  161. }
  162. break;
  163. }
  164. case DAD_CATEGORY:
  165. default:
  166. *accept = ACCEPT_NO;
  167. break;
  168. }
  169. }
  170. return handled;
  171. }
  172. //-----------------------------------------------------------------------------
  173. // LLPanelGroupNotices
  174. //-----------------------------------------------------------------------------
  175. std::string build_notice_date(const U32& the_time)
  176. {
  177. // ISO 8601 date format
  178. time_t t = (time_t)the_time;
  179. if (!t)
  180. {
  181. time(&t);
  182. }
  183. std::string dateStr = "["+LLTrans::getString("LTimeMthNum")+"]/["
  184. +LLTrans::getString("LTimeDay")+"]/["
  185. +LLTrans::getString("LTimeYear")+"]";
  186. LLSD substitution;
  187. substitution["datetime"] = (S32) t;
  188. LLStringUtil::format (dateStr, substitution);
  189. return dateStr;
  190. }
  191. LLPanelGroupNotices::LLPanelGroupNotices() :
  192. LLPanelGroupTab(),
  193. mInventoryItem(NULL),
  194. mInventoryOffer(NULL)
  195. {
  196. }
  197. LLPanelGroupNotices::~LLPanelGroupNotices()
  198. {
  199. sInstances.erase(mGroupID);
  200. if (mInventoryOffer)
  201. {
  202. // Cancel the inventory offer.
  203. mInventoryOffer->forceResponse(IOR_DECLINE);
  204. mInventoryOffer = NULL;
  205. }
  206. }
  207. BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp)
  208. {
  209. return mAllowEdit &&
  210. agentp->hasPowerInGroup(mGroupID, GP_NOTICES_SEND | GP_NOTICES_RECEIVE);
  211. }
  212. BOOL LLPanelGroupNotices::postBuild()
  213. {
  214. bool recurse = true;
  215. mNoticesList = getChild<LLScrollListCtrl>("notice_list",recurse);
  216. mNoticesList->setCommitOnSelectionChange(TRUE);
  217. mNoticesList->setCommitCallback(onSelectNotice, this);
  218. mBtnNewMessage = getChild<LLButton>("create_new_notice",recurse);
  219. mBtnNewMessage->setClickedCallback(onClickNewMessage, this);
  220. mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND));
  221. mBtnGetPastNotices = getChild<LLButton>("refresh_notices",recurse);
  222. mBtnGetPastNotices->setClickedCallback(onClickRefreshNotices, this);
  223. // Create
  224. mCreateSubject = getChild<LLLineEditor>("create_subject",recurse);
  225. mCreateMessage = getChild<LLTextEditor>("create_message",recurse);
  226. mCreateInventoryName =  getChild<LLLineEditor>("create_inventory_name",recurse);
  227. mCreateInventoryName->setTabStop(FALSE);
  228. mCreateInventoryName->setEnabled(FALSE);
  229. mCreateInventoryIcon = getChild<LLIconCtrl>("create_inv_icon",recurse);
  230. mCreateInventoryIcon->setVisible(FALSE);
  231. mBtnSendMessage = getChild<LLButton>("send_notice",recurse);
  232. mBtnSendMessage->setClickedCallback(onClickSendMessage, this);
  233. mBtnRemoveAttachment = getChild<LLButton>("remove_attachment",recurse);
  234. mBtnRemoveAttachment->setClickedCallback(onClickRemoveAttachment, this);
  235. mBtnRemoveAttachment->setEnabled(FALSE);
  236. // View
  237. mViewSubject = getChild<LLLineEditor>("view_subject",recurse);
  238. mViewMessage = getChild<LLTextEditor>("view_message",recurse);
  239. mViewInventoryName =  getChild<LLLineEditor>("view_inventory_name",recurse);
  240. mViewInventoryName->setTabStop(FALSE);
  241. mViewInventoryName->setEnabled(FALSE);
  242. mViewInventoryIcon = getChild<LLIconCtrl>("view_inv_icon",recurse);
  243. mViewInventoryIcon->setVisible(FALSE);
  244. mBtnOpenAttachment = getChild<LLButton>("open_attachment",recurse);
  245. mBtnOpenAttachment->setClickedCallback(onClickOpenAttachment, this);
  246. mNoNoticesStr = getString("no_notices_text");
  247. mPanelCreateNotice = getChild<LLPanel>("panel_create_new_notice",recurse);
  248. mPanelViewNotice = getChild<LLPanel>("panel_view_past_notice",recurse);
  249. LLGroupDropTarget* target = getChild<LLGroupDropTarget> ("drop_target");
  250. target->setPanel (this);
  251. target->setGroup (mGroupID);
  252. arrangeNoticeView(VIEW_PAST_NOTICE);
  253. return LLPanelGroupTab::postBuild();
  254. }
  255. void LLPanelGroupNotices::activate()
  256. {
  257. if(mNoticesList)
  258. mNoticesList->deleteAllItems();
  259. BOOL can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND);
  260. BOOL can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE);
  261. mPanelViewNotice->setEnabled(can_receive);
  262. mPanelCreateNotice->setEnabled(can_send);
  263. // Always disabled to stop direct editing of attachment names
  264. mCreateInventoryName->setEnabled(FALSE);
  265. mViewInventoryName->setEnabled(FALSE);
  266. // If we can receive notices, grab them right away.
  267. if (can_receive)
  268. {
  269. onClickRefreshNotices(this);
  270. }
  271. }
  272. void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item)
  273. {
  274. mInventoryItem = inv_item;
  275. BOOL item_is_multi = FALSE;
  276. if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
  277. {
  278. item_is_multi = TRUE;
  279. };
  280. std::string icon_name = get_item_icon_name(inv_item->getType(),
  281. inv_item->getInventoryType(),
  282. inv_item->getFlags(),
  283. item_is_multi );
  284. mCreateInventoryIcon->setValue(icon_name);
  285. mCreateInventoryIcon->setVisible(TRUE);
  286. std::stringstream ss;
  287. ss << "        " << mInventoryItem->getName();
  288. mCreateInventoryName->setText(ss.str());
  289. mBtnRemoveAttachment->setEnabled(TRUE);
  290. }
  291. void LLPanelGroupNotices::onClickRemoveAttachment(void* data)
  292. {
  293. LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
  294. self->mInventoryItem = NULL;
  295. self->mCreateInventoryName->clear();
  296. self->mCreateInventoryIcon->setVisible(FALSE);
  297. self->mBtnRemoveAttachment->setEnabled(FALSE);
  298. }
  299. //static 
  300. void LLPanelGroupNotices::onClickOpenAttachment(void* data)
  301. {
  302. LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
  303. self->mInventoryOffer->forceResponse(IOR_ACCEPT);
  304. self->mInventoryOffer = NULL;
  305. self->mBtnOpenAttachment->setEnabled(FALSE);
  306. }
  307. void LLPanelGroupNotices::onClickSendMessage(void* data)
  308. {
  309. LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
  310. if (self->mCreateSubject->getText().empty())
  311. {
  312. // Must supply a subject
  313. LLNotificationsUtil::add("MustSpecifyGroupNoticeSubject");
  314. return;
  315. }
  316. send_group_notice(
  317. self->mGroupID,
  318. self->mCreateSubject->getText(),
  319. self->mCreateMessage->getText(),
  320. self->mInventoryItem);
  321. //instantly add new notice. actual notice will be added after ferreshNotices call
  322. LLUUID id = LLUUID::generateNewID();
  323. std::string subj = self->mCreateSubject->getText();
  324. std::string name ;
  325. LLAgentUI::buildFullname(name);
  326. U32 timestamp = 0;
  327. LLSD row;
  328. row["id"] = id;
  329. row["columns"][0]["column"] = "icon";
  330. row["columns"][1]["column"] = "subject";
  331. row["columns"][1]["value"] = subj;
  332. row["columns"][2]["column"] = "from";
  333. row["columns"][2]["value"] = name;
  334. row["columns"][3]["column"] = "date";
  335. row["columns"][3]["value"] = build_notice_date(timestamp);
  336. row["columns"][4]["column"] = "sort";
  337. row["columns"][4]["value"] = llformat( "%u", timestamp);
  338. self->mNoticesList->addElement(row, ADD_BOTTOM);
  339. self->mCreateMessage->clear();
  340. self->mCreateSubject->clear();
  341. onClickRemoveAttachment(data);
  342. self->arrangeNoticeView(VIEW_PAST_NOTICE);
  343. }
  344. //static 
  345. void LLPanelGroupNotices::onClickNewMessage(void* data)
  346. {
  347. LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
  348. self->arrangeNoticeView(CREATE_NEW_NOTICE);
  349. if (self->mInventoryOffer)
  350. {
  351. self->mInventoryOffer->forceResponse(IOR_DECLINE);
  352. self->mInventoryOffer = NULL;
  353. }
  354. self->mCreateSubject->clear();
  355. self->mCreateMessage->clear();
  356. if (self->mInventoryItem) onClickRemoveAttachment(self);
  357. self->mNoticesList->deselectAllItems(TRUE); // TRUE == don't commit on chnage
  358. }
  359. void LLPanelGroupNotices::refreshNotices()
  360. {
  361. onClickRefreshNotices(this);
  362. /*
  363. lldebugs << "LLPanelGroupNotices::onClickGetPastNotices" << llendl;
  364. mNoticesList->deleteAllItems();
  365. LLMessageSystem* msg = gMessageSystem;
  366. msg->newMessage("GroupNoticesListRequest");
  367. msg->nextBlock("AgentData");
  368. msg->addUUID("AgentID",gAgent.getID());
  369. msg->addUUID("SessionID",gAgent.getSessionID());
  370. msg->nextBlock("Data");
  371. msg->addUUID("GroupID",self->mGroupID);
  372. gAgent.sendReliableMessage();
  373. */
  374. }
  375. void LLPanelGroupNotices::onClickRefreshNotices(void* data)
  376. {
  377. lldebugs << "LLPanelGroupNotices::onClickGetPastNotices" << llendl;
  378. LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
  379. self->mNoticesList->deleteAllItems();
  380. LLMessageSystem* msg = gMessageSystem;
  381. msg->newMessage("GroupNoticesListRequest");
  382. msg->nextBlock("AgentData");
  383. msg->addUUID("AgentID",gAgent.getID());
  384. msg->addUUID("SessionID",gAgent.getSessionID());
  385. msg->nextBlock("Data");
  386. msg->addUUID("GroupID",self->mGroupID);
  387. gAgent.sendReliableMessage();
  388. }
  389. //static
  390. std::map<LLUUID,LLPanelGroupNotices*> LLPanelGroupNotices::sInstances;
  391. // static
  392. void LLPanelGroupNotices::processGroupNoticesListReply(LLMessageSystem* msg, void** data)
  393. {
  394. LLUUID group_id;
  395. msg->getUUID("AgentData", "GroupID", group_id);
  396. std::map<LLUUID,LLPanelGroupNotices*>::iterator it = sInstances.find(group_id);
  397. if (it == sInstances.end())
  398. {
  399. llinfos << "Group Panel Notices " << group_id << " no longer in existence."
  400. << llendl;
  401. return;
  402. }
  403. LLPanelGroupNotices* selfp = it->second;
  404. if(!selfp)
  405. {
  406. llinfos << "Group Panel Notices " << group_id << " no longer in existence."
  407. << llendl;
  408. return;
  409. }
  410. selfp->processNotices(msg);
  411. }
  412. void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
  413. {
  414. LLUUID id;
  415. std::string subj;
  416. std::string name;
  417. U32 timestamp;
  418. BOOL has_attachment;
  419. U8 asset_type;
  420. S32 i=0;
  421. S32 count = msg->getNumberOfBlocks("Data");
  422. mNoticesList->setEnabled(TRUE);
  423. for (;i<count;++i)
  424. {
  425. msg->getUUID("Data","NoticeID",id,i);
  426. if (1 == count && id.isNull())
  427. {
  428. // Only one entry, the dummy entry.
  429. mNoticesList->setCommentText(mNoNoticesStr);
  430. mNoticesList->setEnabled(FALSE);
  431. return;
  432. }
  433. msg->getString("Data","Subject",subj,i);
  434. msg->getString("Data","FromName",name,i);
  435. msg->getBOOL("Data","HasAttachment",has_attachment,i);
  436. msg->getU8("Data","AssetType",asset_type,i);
  437. msg->getU32("Data","Timestamp",timestamp,i);
  438. LLSD row;
  439. row["id"] = id;
  440. row["columns"][0]["column"] = "icon";
  441. if (has_attachment)
  442. {
  443. std::string icon_name = get_item_icon_name(
  444. (LLAssetType::EType)asset_type,
  445. LLInventoryType::IT_NONE,FALSE, FALSE);
  446. row["columns"][0]["type"] = "icon";
  447. row["columns"][0]["value"] = icon_name;
  448. }
  449. row["columns"][1]["column"] = "subject";
  450. row["columns"][1]["value"] = subj;
  451. row["columns"][2]["column"] = "from";
  452. row["columns"][2]["value"] = name;
  453. row["columns"][3]["column"] = "date";
  454. row["columns"][3]["value"] = build_notice_date(timestamp);
  455. row["columns"][4]["column"] = "sort";
  456. row["columns"][4]["value"] = llformat( "%u", timestamp);
  457. mNoticesList->addElement(row, ADD_BOTTOM);
  458. }
  459. mNoticesList->updateSort();
  460. }
  461. void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data)
  462. {
  463. LLPanelGroupNotices* self = (LLPanelGroupNotices*)data;
  464. if(!self) return;
  465. LLScrollListItem* item = self->mNoticesList->getFirstSelected();
  466. if (!item) return;
  467. LLMessageSystem* msg = gMessageSystem;
  468. msg->newMessage("GroupNoticeRequest");
  469. msg->nextBlock("AgentData");
  470. msg->addUUID("AgentID",gAgent.getID());
  471. msg->addUUID("SessionID",gAgent.getSessionID());
  472. msg->nextBlock("Data");
  473. msg->addUUID("GroupNoticeID",item->getUUID());
  474. gAgent.sendReliableMessage();
  475. lldebugs << "Item " << item->getUUID() << " selected." << llendl;
  476. }
  477. void LLPanelGroupNotices::showNotice(const std::string& subject,
  478.  const std::string& message,
  479.  const bool& has_inventory,
  480.  const std::string& inventory_name,
  481.  LLOfferInfo* inventory_offer)
  482. {
  483. arrangeNoticeView(VIEW_PAST_NOTICE);
  484. if(mViewSubject) mViewSubject->setText(subject);
  485. if(mViewMessage) mViewMessage->setText(message);
  486. if (mInventoryOffer)
  487. {
  488. // Cancel the inventory offer for the previously viewed notice
  489. mInventoryOffer->forceResponse(IOR_DECLINE); 
  490. mInventoryOffer = NULL;
  491. }
  492. if (inventory_offer)
  493. {
  494. mInventoryOffer = inventory_offer;
  495. std::string icon_name = get_item_icon_name(mInventoryOffer->mType,
  496. LLInventoryType::IT_TEXTURE,
  497. 0, FALSE);
  498. mViewInventoryIcon->setValue(icon_name);
  499. mViewInventoryIcon->setVisible(TRUE);
  500. std::stringstream ss;
  501. ss << "        " << inventory_name;
  502. mViewInventoryName->setText(ss.str());
  503. mBtnOpenAttachment->setEnabled(TRUE);
  504. }
  505. else
  506. {
  507. mViewInventoryName->clear();
  508. mViewInventoryIcon->setVisible(FALSE);
  509. mBtnOpenAttachment->setEnabled(FALSE);
  510. }
  511. }
  512. void LLPanelGroupNotices::arrangeNoticeView(ENoticeView view_type)
  513. {
  514. if (CREATE_NEW_NOTICE == view_type)
  515. {
  516.         mPanelCreateNotice->setVisible(TRUE);
  517. mPanelViewNotice->setVisible(FALSE);
  518. }
  519. else
  520. {
  521. mPanelCreateNotice->setVisible(FALSE);
  522. mPanelViewNotice->setVisible(TRUE);
  523. mBtnOpenAttachment->setEnabled(FALSE);
  524. }
  525. }
  526. void LLPanelGroupNotices::setGroupID(const LLUUID& id)
  527. {
  528. sInstances.erase(mGroupID);
  529. LLPanelGroupTab::setGroupID(id);
  530. sInstances[mGroupID] = this;
  531. mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND));
  532. LLGroupDropTarget* target = getChild<LLGroupDropTarget> ("drop_target");
  533. target->setPanel (this);
  534. target->setGroup (mGroupID);
  535. activate();
  536. }