diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-05-28 15:48:47 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-05-28 15:48:47 -0700 |
commit | 99aea0f4e7f49d202bb2b4c85cafb2c2d8aa6987 (patch) | |
tree | 2eef41e77e793d33a43531da8be576ca813fb438 /indra | |
parent | 26b601b99e43eac623c81a60e93094577b06d209 (diff) | |
parent | 892ac2bb1eec257bbf29d57738e819b7ff368bb9 (diff) |
Merge
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterscriptlimits.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llinspectremoteobject.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llpanelme.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 26 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.h | 2 | ||||
-rw-r--r-- | indra/newview/lltoastimpanel.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewerdisplayname.cpp | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_activeim_row.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_instant_message.xml | 2 |
10 files changed, 61 insertions, 25 deletions
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 0149ead92e..f8a5e57389 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -730,8 +730,8 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) if(std::find(names_requested.begin(), names_requested.end(), owner_id) == names_requested.end()) { names_requested.push_back(owner_id); - gCacheName->get(owner_id, is_group_owned, - boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, + gCacheName->get(owner_id, is_group_owned, // username + boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache, this, _1, _2)); } } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e6db942bad..136ccbca49 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -109,6 +109,20 @@ BOOL LLSessionTimeoutTimer::tick() return TRUE; } +static void on_avatar_name_cache_toast(const LLUUID& agent_id, + const LLAvatarName& av_name, + LLSD msg) +{ + LLSD args; + args["MESSAGE"] = msg["message"]; + args["TIME"] = msg["time"]; + // *TODO: Can this ever be an object name or group name? + args["FROM"] = av_name.getCompleteName(); + args["FROM_ID"] = msg["from_id"]; + args["SESSION_ID"] = msg["session_id"]; + LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID())); +} + void toast_callback(const LLSD& msg){ // do not show toast in busy mode or it goes from agent if (gAgent.getBusy() || gAgent.getID() == msg["from_id"]) @@ -136,14 +150,9 @@ void toast_callback(const LLSD& msg){ return; } - LLSD args; - args["MESSAGE"] = msg["message"]; - args["TIME"] = msg["time"]; - args["FROM"] = msg["from"]; - args["FROM_ID"] = msg["from_id"]; - args["SESSION_ID"] = msg["session_id"]; - - LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID())); + LLAvatarNameCache::get(msg["from_id"].asUUID(), + boost::bind(&on_avatar_name_cache_toast, + _1, _2, msg)); } void LLIMModel::setActiveSessionID(const LLUUID& session_id) diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index 08446760f8..b651306d96 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -71,7 +71,7 @@ private: private: LLUUID mObjectID; LLUUID mOwnerID; - std::string mOwner; + std::string mOwnerLegacyName; std::string mSLurl; std::string mName; bool mGroupOwned; @@ -81,7 +81,7 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) : LLInspect(LLSD()), mObjectID(NULL), mOwnerID(NULL), - mOwner(""), + mOwnerLegacyName(), mSLurl(""), mName(""), mGroupOwned(false) @@ -118,10 +118,10 @@ void LLInspectRemoteObject::onOpen(const LLSD& data) mSLurl = data["slurl"].asString(); // work out the owner's name - mOwner = ""; + mOwnerLegacyName = ""; if (gCacheName) { - gCacheName->get(mOwnerID, mGroupOwned, + gCacheName->get(mOwnerID, mGroupOwned, // muting boost::bind(&LLInspectRemoteObject::onNameCache, this, _1, _2, _3)); } @@ -142,7 +142,7 @@ void LLInspectRemoteObject::onClickMap() void LLInspectRemoteObject::onClickBlock() { LLMute::EType mute_type = mGroupOwned ? LLMute::GROUP : LLMute::AGENT; - LLMute mute(mOwnerID, mOwner, mute_type); + LLMute mute(mOwnerID, mOwnerLegacyName, mute_type); LLMuteList::getInstance()->add(mute); LLPanelBlockedList::showPanelAndSelect(mute.mID); closeFloater(); @@ -155,7 +155,7 @@ void LLInspectRemoteObject::onClickClose() void LLInspectRemoteObject::onNameCache(const LLUUID& id, const std::string& name, bool is_group) { - mOwner = name; + mOwnerLegacyName = name; update(); } @@ -166,7 +166,7 @@ void LLInspectRemoteObject::update() getChild<LLUICtrl>("object_name")->setValue("<nolink>" + mName + "</nolink>"); // show the object's owner - click it to show profile - std::string owner = mOwner; + std::string owner; if (! mOwnerID.isNull()) { if (mGroupOwned) diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index d1ce59d436..cd0cbe8128 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -390,6 +390,8 @@ void LLPanelMyProfileEdit::onClickSetName() return; } + llinfos << "name-change now " << LLDate::now() << " next_update " + << LLDate(av_name.mNextUpdate) << llendl; F64 now_secs = LLDate::now().secondsSinceEpoch(); if (now_secs < av_name.mNextUpdate) { diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index cb65756764..87481535ff 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -32,14 +32,15 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llsyswellwindow.h" + #include "llagent.h" +#include "llavatarnamecache.h" #include "llflatlistview.h" #include "llfloaterreg.h" #include "llnotifications.h" -#include "llsyswellwindow.h" - #include "llbottomtray.h" #include "llscriptfloater.h" #include "llviewercontrol.h" @@ -284,14 +285,31 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& mChiclet->setOtherParticipantId(otherParticipantId); mChiclet->setVisible(true); - LLTextBox* contactName = getChild<LLTextBox>("contact_name"); - contactName->setValue(name); + if (im_chiclet_type == LLIMChiclet::TYPE_IM) + { + LLAvatarNameCache::get(otherParticipantId, + boost::bind(&LLIMWellWindow::RowPanel::onAvatarNameCache, + this, _1, _2)); + } + else + { + LLTextBox* contactName = getChild<LLTextBox>("contact_name"); + contactName->setValue(name); + } mCloseBtn = getChild<LLButton>("hide_btn"); mCloseBtn->setCommitCallback(boost::bind(&LLIMWellWindow::RowPanel::onClosePanel, this)); } //--------------------------------------------------------------------------------- +void LLIMWellWindow::RowPanel::onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name) +{ + LLTextBox* contactName = getChild<LLTextBox>("contact_name"); + contactName->setValue( av_name.getCompleteName() ); +} + +//--------------------------------------------------------------------------------- void LLIMWellWindow::RowPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param) { LLTextBox* text = getChild<LLTextBox>("contact_name"); diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index c8215c71ee..9d8fe536e2 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -43,6 +43,7 @@ #include "boost/shared_ptr.hpp" +class LLAvatarName; class LLFlatListView; class LLChiclet; class LLIMChiclet; @@ -208,6 +209,7 @@ private: private: static const S32 CHICLET_HPAD = 10; + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); void onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param); void onClosePanel(); public: diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 26d3bd5192..2c5438c47d 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -147,7 +147,8 @@ void LLToastIMPanel::spawnNameToolTip() { // Spawn at right side of the name textbox. LLRect sticky_rect = mAvatarName->calcScreenRect(); - S32 icon_x = llmin(sticky_rect.mLeft + mAvatarName->getTextPixelWidth() + 3, sticky_rect.mRight - 16); + S32 icon_x = + llmin(sticky_rect.mLeft + mAvatarName->getTextPixelWidth() + 3, sticky_rect.mRight); LLCoordGL pos(icon_x, sticky_rect.mTop); LLToolTip::Params params; diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index a783cb03d8..bda0fe9737 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -166,9 +166,13 @@ class LLDisplayNameUpdate : public LLHTTPNode LLAvatarName av_name; av_name.fromLLSD( name_data ); + llinfos << "name-update now " << LLDate::now() + << " next_update " << LLDate(av_name.mNextUpdate) + << llendl; + // Name expiration time may be provided in headers, or we may use a // default value - // JAMESDEBUG TODO: get actual headers out of ResponsePtr + // *TODO: get actual headers out of ResponsePtr //LLSD headers = response->mHeaders; LLSD headers; av_name.mExpires = diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml index 3416b2369d..72f41c62f4 100644 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml @@ -71,7 +71,7 @@ top="10" left_pad="10" height="14" - width="255" + width="250" length="1" follows="right|left" use_ellipses="true" diff --git a/indra/newview/skins/default/xui/en/panel_instant_message.xml b/indra/newview/skins/default/xui/en/panel_instant_message.xml index 34fd3352a3..021cf00d03 100644 --- a/indra/newview/skins/default/xui/en/panel_instant_message.xml +++ b/indra/newview/skins/default/xui/en/panel_instant_message.xml @@ -67,7 +67,7 @@ top="8" use_ellipses="true" value="Erica Vader" - width="212" /> + width="205" /> <!-- TIME STAMP --> <text font="SansSerifSmall" |