diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2009-11-04 22:17:23 +0200 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2009-11-04 22:17:23 +0200 |
commit | 8c27615aa5c1fc61fa0a5877717699d5df47476d (patch) | |
tree | 86b35df06b8abddc9774cdd3f907b6ae13b131ef | |
parent | 5a2424d01026327ae8eb17ec2b319495c6f5e9b1 (diff) |
Implemented normal sub-task EXT-2144 (IM P2p control panel should contain avatar name under avatar icon aligned to the left side)
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llpanelimcontrolpanel.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_session.xml | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_im_control_panel.xml | 12 |
4 files changed, 39 insertions, 8 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 80b29c4fa7..76612f2dd1 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -123,6 +123,8 @@ BOOL LLPanelIMControlPanel::postBuild() childSetAction("teleport_btn", boost::bind(&LLPanelIMControlPanel::onTeleportButtonClicked, this)); childSetAction("pay_btn", boost::bind(&LLPanelIMControlPanel::onPayButtonClicked, this)); childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(getChild<LLAvatarIconCtrl>("avatar_icon")->getAvatarId())); + + return LLPanelChatControlPanel::postBuild(); } @@ -166,6 +168,9 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(mAvatarID); + // Fetch the currect name + gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4)); + llwarns << "gCacheName->get" << llendl; // Disable profile button if participant is not realy SL avatar LLIMModel::LLIMSession* im_session = im_model.findIMSession(session_id); @@ -173,6 +178,19 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("view_profile_btn", FALSE); } +void LLPanelIMControlPanel::nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group) +{ + llwarns << "LLPanelIMControlPanel::nameUpdatedCallback" << llendl; + if ( id == mAvatarID ) + { + llwarns << "LLPanelIMControlPanel::nameUpdatedCallback id == mAvatarID" << llendl; + std::string avatar_name; + avatar_name.assign(first); + avatar_name.append(" "); + avatar_name.append(last); + getChild<LLTextBox>("avatar_name")->setValue(avatar_name); + } +} LLPanelGroupControlPanel::LLPanelGroupControlPanel(const LLUUID& session_id) { diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 1f38bffb53..ac5d86345e 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -72,6 +72,9 @@ public: void setSessionId(const LLUUID& session_id); +protected: + void nameUpdatedCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); + private: void onViewProfileButtonClicked(); void onAddFriendButtonClicked(); diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 1585d976b3..70af2f63b6 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -3,7 +3,7 @@ legacy_header_height="18" background_visible="true" follows="left|top|right|bottom" - height="359" + height="369" layout="topleft" left="0" name="panel_im" @@ -14,10 +14,10 @@ visible="true" width="520" can_resize="true" - min_width="200" - min_height="150"> + min_width="350" + min_height="350"> <layout_stack follows="left|top|right|bottom" - height="344" + height="354" width="520" layout="topleft" orientation="horizontal" @@ -28,12 +28,12 @@ name="panel_im_control_panel" layout="topleft" top_delta="-3" - height="344" + height="354" follows="left" label="IM Control Panel" auto_resize="false" user_resize="false" /> - <layout_panel height="344" + <layout_panel height="354" width="355" left_delta="146" top="0" @@ -56,7 +56,7 @@ length="1" follows="left|top|right|bottom" font="SansSerif" - height="290" + height="300" layout="topleft" name="chat_history" parse_highlights="true" diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index f77a2ec730..c8b134cdf0 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel border="false" - height="327" + height="350" name="panel_im_control_panel" width="131"> @@ -13,6 +13,16 @@ top="-10" width="125"/> + <text + follows="left|right" + font="SansSerifBig" + height="16" + layout="topleft" + name="avatar_name" + use_ellipses="true" + value="Unknown" + width="125" /> + <button follows="left|bottom" height="20" |