fixed EXT-3841 [BSI] "Send IM..." choosable in IM floater context menu

--HG--
branch : product-engine
meow-7.2.2
Igor Borovkov 2010-01-28 15:51:49 +02:00
parent 14caf5475b
commit f6fceac081
3 changed files with 12 additions and 1 deletions

View File

@ -87,7 +87,8 @@ public:
mTimeStr(),
mPosAgent(),
mURL(),
mChatStyle(CHAT_STYLE_NORMAL)
mChatStyle(CHAT_STYLE_NORMAL),
mSessionID()
{ }
std::string mText; // UTF-8 line of text
@ -102,6 +103,7 @@ public:
LLVector3 mPosAgent;
std::string mURL;
EChatStyle mChatStyle;
LLUUID mSessionID;
};
#endif

View File

@ -34,6 +34,7 @@
#include "llinstantmessage.h"
#include "llimview.h"
#include "llchathistory.h"
#include "llpanel.h"
#include "lluictrlfactory.h"
@ -183,6 +184,7 @@ public:
void setup(const LLChat& chat,const LLStyle::Params& style_params)
{
mAvatarID = chat.mFromID;
mSessionID = chat.mSessionID;
mSourceType = chat.mSourceType;
gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4));
if(chat.mFromID.isNull())
@ -305,6 +307,11 @@ protected:
menu->setItemEnabled("Remove Friend", false);
}
if (mSessionID == LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, mAvatarID))
{
menu->setItemVisible("Send IM", false);
}
menu->buildDrawLabels();
menu->updateParent(LLMenuGL::sMenuContainer);
LLMenuGL::showPopup(this, menu, x, y);
@ -344,6 +351,7 @@ protected:
std::string mFirstName;
std::string mLastName;
std::string mFrom;
LLUUID mSessionID;
S32 mMinUserNameWidth;
};

View File

@ -599,6 +599,7 @@ void LLIMFloater::updateMessages()
LLChat chat;
chat.mFromID = from_id;
chat.mSessionID = mSessionID;
chat.mFromName = from;
chat.mText = message;
chat.mTimeStr = time;