summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llimfloatercontainer.cpp48
-rw-r--r--indra/newview/llimfloatercontainer.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_im_container.xml5
-rw-r--r--indra/newview/skins/default/xui/en/widgets/tab_container.xml1
4 files changed, 18 insertions, 37 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 22eb9a51d2..9539553121 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -37,6 +37,7 @@
#include "llfloaterreg.h"
#include "llimview.h"
#include "llavatariconctrl.h"
+#include "llgroupiconctrl.h"
#include "llagent.h"
//
@@ -90,43 +91,27 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp,
LLUUID session_id = floaterp->getKey();
+ LLIconCtrl* icon = 0;
+
if(gAgent.isInGroup(session_id))
{
- mSessions[session_id] = floaterp;
- LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(session_id);
- LLGroupMgr* gm = LLGroupMgr::getInstance();
- gm->addObserver(session_id, this);
- floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id));
+ LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>();
+ icon_params.group_id = session_id;
+ icon = LLUICtrlFactory::instance().createWidget<LLGroupIconCtrl>(icon_params);
- if (group_data && group_data->mInsigniaID.notNull())
- {
- mTabContainer->setTabImage(get_ptr_in_map(mSessions, session_id), group_data->mInsigniaID);
- }
- else
- {
- mTabContainer->setTabImage(floaterp, "Generic_Group");
- gm->sendGroupPropertiesRequest(session_id);
- }
+ mSessions[session_id] = floaterp;
}
else
{
LLUUID avatar_id = LLIMModel::getInstance()->getOtherParticipantID(session_id);
- LLAvatarPropertiesProcessor& app = LLAvatarPropertiesProcessor::instance();
- app.addObserver(avatar_id, this);
- floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, avatar_id));
- mSessions[avatar_id] = floaterp;
- LLUUID* icon_id_ptr = LLAvatarIconIDCache::getInstance()->get(avatar_id);
- if(icon_id_ptr && icon_id_ptr->notNull())
- {
- mTabContainer->setTabImage(floaterp, *icon_id_ptr);
- }
- else
- {
- mTabContainer->setTabImage(floaterp, "Generic_Person");
- app.sendAvatarPropertiesRequest(avatar_id);
- }
+ LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLAvatarIconCtrl>();
+ icon_params.avatar_id = avatar_id;
+ icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params);
+
+ mSessions[avatar_id] = floaterp;
}
+ mTabContainer->setTabImage(floaterp, icon);
}
void LLIMFloaterContainer::processProperties(void* data, enum EAvatarProcessorType type)
@@ -159,13 +144,6 @@ void LLIMFloaterContainer::changed(const LLUUID& group_id, LLGroupChange gc)
}
}
-void LLIMFloaterContainer::onCloseFloater(LLUUID id)
-{
- LLAvatarPropertiesProcessor::instance().removeObserver(id, this);
- LLGroupMgr::instance().removeObserver(id, this);
-
-}
-
void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data)
{
LLUUID session_id = data["from_id"].asUUID();
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index bc06f0cbd3..daf367da11 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -69,7 +69,6 @@ private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
avatarID_panel_map_t mSessions;
- void onCloseFloater(LLUUID avatar_id);
void onNewMessageReceived(const LLSD& data);
};
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index bd25288a9e..978b40da77 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -19,8 +19,11 @@
left="1"
name="im_box_tab_container"
tab_position="bottom"
- tab_width="80"
+ tab_width="64"
+ tab_max_width = "134"
tab_height="16"
+ use_custom_icon_ctrl="true"
+ tab_icon_ctrl_pad="2"
top="0"
width="390" />
<icon
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 597c4e83b6..4a163fc1e3 100644
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -5,6 +5,7 @@ label_pad_left - padding to the left of tab button labels
-->
<tab_container tab_min_width="60"
tab_max_width="150"
+ use_custom_icon_ctrl="false"
halign="center"
font="SansSerifSmall"
tab_height="21"