merging changes

meow-7.2.2
Gilbert Gonzales 2013-01-15 20:37:54 -08:00
commit 41a53e8649
6 changed files with 18 additions and 5 deletions

View File

@ -1852,6 +1852,7 @@ void LLPostponedNotification::fetchAvatarName(const LLUUID& id)
{
mAvatarNameCacheConnection.disconnect();
}
mAvatarNameCacheConnection = LLAvatarNameCache::get(id, boost::bind(&LLPostponedNotification::onAvatarNameCache, this, _1, _2));
}
}
@ -1860,7 +1861,7 @@ void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
mAvatarNameCacheConnection.disconnect();
std::string name = av_name.getCompleteName();
// from PE merge - we should figure out if this is the right thing to do

View File

@ -92,6 +92,7 @@
#include "llevents.h"
#include "llfunctorregistry.h"
#include "llinitparam.h"
#include "llmortician.h"
#include "llnotificationptr.h"
#include "llpointer.h"
#include "llrefcount.h"
@ -981,7 +982,7 @@ private:
* 1 create class derived from LLPostponedNotification;
* 2 call LLPostponedNotification::add method;
*/
class LLPostponedNotification
class LLPostponedNotification : public LLMortician
{
public:
/**
@ -1014,7 +1015,7 @@ private:
void cleanup()
{
delete this;
die();
}
protected:

View File

@ -239,6 +239,9 @@ BOOL LLFloaterIMContainer::postBuild()
// Init the sort order now that the root had been created
setSortOrder(LLConversationSort(gSavedSettings.getU32("ConversationSortOrder")));
// Keep the xml set title around for when we have to overwrite it
mGeneralTitle = getTitle();
mInitialized = true;
// Add callbacks:
@ -503,10 +506,10 @@ void LLFloaterIMContainer::draw()
collapseMessagesPane(true);
}
//Update moderator options visibility
const LLConversationItem *current_session = getCurSelectedViewModelItem();
if (current_session)
{
// Update moderator options visibility
LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin();
LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd();
while (current_participant_model != end_participant_model)
@ -516,6 +519,9 @@ void LLFloaterIMContainer::draw()
current_participant_model++;
}
// Update floater's title as required by the currently selected session or use the default title
LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(current_session->getUUID());
setTitle(conversation_floaterp && conversation_floaterp->needsTitleOverwrite() ? conversation_floaterp->getTitle() : mGeneralTitle);
}
LLFloater::draw();

View File

@ -169,6 +169,7 @@ private:
bool mInitialized;
LLUUID mSelectedSession;
std::string mGeneralTitle;
// Conversation list implementation
public:

View File

@ -70,6 +70,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
mShouldSendTypingState(false),
mMeTyping(false),
mOtherTyping(false),
mSessionNameUpdatedForTyping(false),
mTypingTimer(),
mTypingTimeoutTimer(),
mPositioned(false),
@ -556,6 +557,7 @@ void LLFloaterIMSession::updateSessionName(const std::string& name)
LLFloaterIMSessionTab::updateSessionName(name);
mTypingStart.setArg("[NAME]", name);
setTitle (mOtherTyping ? mTypingStart.getString() : name);
mSessionNameUpdatedForTyping = mOtherTyping;
}
}
@ -705,7 +707,7 @@ BOOL LLFloaterIMSession::getVisible()
// getVisible() returns TRUE when Tabbed IM window is minimized.
visible = is_active && !im_container->isMinimized()
&& im_container->getVisible();
}
}
}
else
{

View File

@ -132,6 +132,7 @@ public:
static boost::signals2::connection setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb);
static floater_showed_signal_t sIMFloaterShowedSignal;
bool needsTitleOverwrite() { return mSessionNameUpdatedForTyping && mOtherTyping; }
private:
/*virtual*/ void refresh();
@ -182,6 +183,7 @@ private:
bool mShouldSendTypingState;
LLFrameTimer mTypingTimer;
LLFrameTimer mTypingTimeoutTimer;
bool mSessionNameUpdatedForTyping;
bool mSessionInitialized;
LLSD mQueuedMsgsForInit;