diff options
author | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-10-28 20:59:33 +0200 |
---|---|---|
committer | Eugene Kondrashev <ekondrashev@productengine.com> | 2009-10-28 20:59:33 +0200 |
commit | 79738b2a65ef609f49db9bd2ff57fe5ae8e7e830 (patch) | |
tree | b98d35ead825522578ac138ef544179ddd5ec66d | |
parent | e9c83f234306e070aa1f31eff68719589265f916 (diff) |
Fixed normal bug EXT-1857-'Group Info' btn is unnecessary in Friends Conference floater
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llimfloater.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llimfloater.h | 1 | ||||
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.h | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml | 29 |
5 files changed, 72 insertions, 8 deletions
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<LLPanel>("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<LLAvatarList>("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 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + name="panel_im_control_panel" + width="146" + height="215" + border="false"> + <avatar_list + color="DkGray2" + follows="left|top|right|bottom" + height="130" + ignore_online_status="true" + layout="topleft" + left="3" + name="speakers_list" + opaque="false" + top="10" + width="140" /> + <button + name="call_btn" + label="Call" + width="90" + height="20" /> + <button + name="end_call_btn" + label="End Call" + width="90" + height="20" + visible="false"/> +</panel> |