From 79738b2a65ef609f49db9bd2ff57fe5ae8e7e830 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Wed, 28 Oct 2009 20:59:33 +0200 Subject: Fixed normal bug EXT-1857-'Group Info' btn is unnecessary in Friends Conference floater --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 22 ++++++++++++---- indra/newview/llimfloater.h | 1 + indra/newview/llpanelimcontrolpanel.cpp | 14 +++++++++++ indra/newview/llpanelimcontrolpanel.h | 14 ++++++++--- .../default/xui/en/panel_adhoc_control_panel.xml | 29 ++++++++++++++++++++++ 5 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 2f060acb50..b86795f696 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -78,12 +78,15 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) mSessionInitialized = im_session->mSessionInitialized; mDialog = im_session->mType; - if (IM_NOTHING_SPECIAL == mDialog || IM_SESSION_P2P_INVITE == mDialog) - { + switch(mDialog){ + case IM_NOTHING_SPECIAL: + case IM_SESSION_P2P_INVITE: mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelIMControl, this); - } - else - { + break; + case IM_SESSION_CONFERENCE_START: + mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelAdHocControl, this); + break; + default: mFactoryMap["panel_im_control_panel"] = LLCallbackMap(createPanelGroupControl, this); } } @@ -290,6 +293,15 @@ void* LLIMFloater::createPanelGroupControl(void* userdata) return self->mControlPanel; } +// static +void* LLIMFloater::createPanelAdHocControl(void* userdata) +{ + LLIMFloater *self = (LLIMFloater*)userdata; + self->mControlPanel = new LLPanelAdHocControlPanel(self->mSessionID); + self->mControlPanel->setXMLFilename("panel_adhoc_control_panel.xml"); + return self->mControlPanel; +} + void LLIMFloater::onSlide() { LLPanel* im_control_panel = getChild("panel_im_control_panel"); diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 4097f11f56..3da27ac941 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -102,6 +102,7 @@ private: void onSlide(); static void* createPanelIMControl(void* userdata); static void* createPanelGroupControl(void* userdata); + static void* createPanelAdHocControl(void* userdata); // gets a rect that bounds possible positions for the LLIMFloater on a screen (EXT-1111) void getAllowedRect(LLRect& rect); diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 5b589d6de6..f9eeaf1e9e 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -187,3 +187,17 @@ void LLPanelGroupControlPanel::setSessionId(const LLUUID& session_id) mGroupID = LLIMModel::getInstance()->getOtherParticipantID(session_id); } + + +LLPanelAdHocControlPanel::LLPanelAdHocControlPanel(const LLUUID& session_id):LLPanelGroupControlPanel(session_id) +{ +} + +BOOL LLPanelAdHocControlPanel::postBuild() +{ + mAvatarList = getChild("speakers_list"); + mParticipantList = new LLParticipantList(mSpeakerManager, mAvatarList); + + return LLPanelChatControlPanel::postBuild(); +} + diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 00c96cf31a..220b7b14ba 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -88,15 +88,23 @@ public: void setSessionId(const LLUUID& session_id); /*virtual*/ void draw(); -private: - void onGroupInfoButtonClicked(); - +protected: LLUUID mGroupID; LLSpeakerMgr* mSpeakerManager; LLAvatarList* mAvatarList; LLParticipantList* mParticipantList; + +private: + void onGroupInfoButtonClicked(); }; +class LLPanelAdHocControlPanel : public LLPanelGroupControlPanel +{ +public: + LLPanelAdHocControlPanel(const LLUUID& session_id); + BOOL postBuild(); + +}; #endif // LL_LLPANELIMCONTROLPANEL_H diff --git a/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml new file mode 100644 index 0000000000..8db745fab7 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml @@ -0,0 +1,29 @@ + + + +