summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimfloater.cpp22
-rw-r--r--indra/newview/llimfloater.h1
-rw-r--r--indra/newview/llimview.cpp7
-rw-r--r--indra/newview/lllandmarkactions.cpp2
-rw-r--r--indra/newview/lllandmarkactions.h2
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp14
-rw-r--r--indra/newview/llpanelimcontrolpanel.h14
-rw-r--r--indra/newview/skins/default/xui/en/panel_adhoc_control_panel.xml29
8 files changed, 80 insertions, 11 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/llimview.cpp b/indra/newview/llimview.cpp
index a2b6ef6aa5..8a55ab41b9 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1363,7 +1363,12 @@ void LLIMMgr::addMessage(
bool new_session = !hasSession(session_id);
if (new_session)
{
- LLIMModel::getInstance()->newSession(session_id, fixed_session_name, dialog, other_participant_id);
+ // *NOTE dzaporozhan
+ // Workaround for critical bug EXT-1918
+
+ // *TODO
+ // Investigate cases when session_id == NULL and find solution to handle those cases
+ LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id);
}
floater = findFloaterBySession(new_session_id);
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index b36b7cf50e..091346d3b4 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -348,7 +348,7 @@ LLLandmark* LLLandmarkActions::getLandmark(const LLUUID& landmarkInventoryItemID
{
LLViewerInventoryItem* item = gInventory.getItem(landmarkInventoryItemID);
if (NULL == item)
- return false;
+ return NULL;
const LLUUID& asset_id = item->getAssetUUID();
return gLandmarkList.getAsset(asset_id, NULL);
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index d651259790..32f05e702b 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -108,7 +108,7 @@ public:
/**
* @brief Retrieve a landmark from gLandmarkList by inventory item's id
*
- * @return pointer to loaded landmark from gLandmarkList or NULL if landmark does not exist.
+ * @return pointer to loaded landmark from gLandmarkList or NULL if landmark does not exist or wasn't loaded.
*/
static LLLandmark* getLandmark(const LLUUID& landmarkInventoryItemID);
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>