diff options
Diffstat (limited to 'indra/newview/llpanelgroupinvite.cpp')
-rw-r--r-- | indra/newview/llpanelgroupinvite.cpp | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index eedec9c8eb..1e6eb8ed44 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -39,6 +39,7 @@ #include "llcombobox.h" #include "llgroupmgr.h" #include "llnamelistctrl.h" +#include "llscrolllistitem.h" #include "llspinctrl.h" #include "lltextbox.h" #include "llviewerobject.h" @@ -351,18 +352,13 @@ void LLPanelGroupInvite::impl::callbackAddUsers(const std::vector<std::string>& if ( selfp) selfp->addUsers(names, ids); } -LLPanelGroupInvite::LLPanelGroupInvite(const std::string& name, - const LLUUID& group_id) - : LLPanel(name) +LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id) + : LLPanel(), + mImplementation(new impl(group_id)), + mPendingUpdate(FALSE) { - mImplementation = new impl(group_id); - mPendingUpdate = FALSE; - mStoreSelected = LLUUID::null; - - std::string panel_def_file; - // Pass on construction of this panel to the control factory. - LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_invite.xml", &getFactoryMap()); + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_group_invite.xml"); } LLPanelGroupInvite::~LLPanelGroupInvite() @@ -519,9 +515,8 @@ BOOL LLPanelGroupInvite::postBuild() getChild<LLNameListCtrl>("invitee_list", recurse); if ( mImplementation->mInvitees ) { - mImplementation->mInvitees->setCallbackUserData(mImplementation); mImplementation->mInvitees->setCommitOnSelectionChange(TRUE); - mImplementation->mInvitees->setCommitCallback(impl::callbackSelect); + mImplementation->mInvitees->setCommitCallback(impl::callbackSelect, mImplementation); } LLButton* button = getChild<LLButton>("add_button", recurse); @@ -529,17 +524,14 @@ BOOL LLPanelGroupInvite::postBuild() { // default to opening avatarpicker automatically // (*impl::callbackClickAdd)((void*)this); - button->setClickedCallback(impl::callbackClickAdd); - button->setCallbackUserData(this); + button->setClickedCallback(impl::callbackClickAdd, this); } mImplementation->mRemoveButton = getChild<LLButton>("remove_button", recurse); if ( mImplementation->mRemoveButton ) { - mImplementation->mRemoveButton-> - setClickedCallback(impl::callbackClickRemove); - mImplementation->mRemoveButton->setCallbackUserData(mImplementation); + mImplementation->mRemoveButton->setClickedCallback(impl::callbackClickRemove, mImplementation); mImplementation->mRemoveButton->setEnabled(FALSE); } @@ -547,17 +539,14 @@ BOOL LLPanelGroupInvite::postBuild() getChild<LLButton>("ok_button", recurse); if ( mImplementation->mOKButton ) { - mImplementation->mOKButton-> - setClickedCallback(impl::callbackClickOK); - mImplementation->mOKButton->setCallbackUserData(mImplementation); + mImplementation->mOKButton->setClickedCallback(impl::callbackClickOK, mImplementation); mImplementation->mOKButton->setEnabled(FALSE); } button = getChild<LLButton>("cancel_button", recurse); if ( button ) { - button->setClickedCallback(impl::callbackClickCancel); - button->setCallbackUserData(mImplementation); + button->setClickedCallback(impl::callbackClickCancel, mImplementation); } mImplementation->mOwnerWarning = getString("confirm_invite_owner_str"); |