summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index abf15ea9cf..59ae8a9a81 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -306,6 +306,9 @@ bool LLFloaterIMContainer::postBuild()
mParticipantRefreshTimer.setTimerExpirySec(0);
mParticipantRefreshTimer.start();
+ mGeneralTitleInUse = true; // avoid reseting strings on idle
+ setTitle(mGeneralTitle);
+
return true;
}
@@ -521,7 +524,12 @@ void LLFloaterIMContainer::idleUpdate()
// 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);
+ bool needs_override = conversation_floaterp && conversation_floaterp->needsTitleOverwrite();
+ if (mGeneralTitleInUse == needs_override)
+ {
+ mGeneralTitleInUse = !needs_override;
+ setTitle(needs_override ? conversation_floaterp->getTitle() : mGeneralTitle);
+ }
}
mParticipantRefreshTimer.setTimerExpirySec(1.0f);
@@ -1051,6 +1059,10 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata)
{
setSortOrderParticipants(LLConversationFilter::SO_DISTANCE);
}
+ if ("put_nearby_session_first" == command)
+ {
+ gSavedSettings.setBOOL("IMNearbySessionFirst", !gSavedSettings.getBOOL("IMNearbySessionFirst"));
+ }
if ("chat_preferences" == command)
{
LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance<LLFloaterPreference>("preferences");
@@ -1101,6 +1113,10 @@ bool LLFloaterIMContainer::isActionChecked(const LLSD& userdata)
{
return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE);
}
+ if ("put_nearby_session_first" == command)
+ {
+ return gSavedSettings.getBOOL("IMNearbySessionFirst");
+ }
if ("Translating.Enabled" == command)
{
return gSavedPerAccountSettings.getBOOL("TranslatingEnabled");
@@ -1931,7 +1947,7 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
mConversationEventQueue.erase(uuid);
// Don't let the focus fall IW, select and refocus on the first conversation in the list
- if (change_focus)
+ if (change_focus && isInVisibleChain())
{
setFocus(true);
if (new_selection)
@@ -1951,6 +1967,10 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
}
}
}
+ else
+ {
+ LL_INFOS() << "Conversation widgets: " << (S32)mConversationsWidgets.size() << LL_ENDL;
+ }
return is_widget_selected;
}
@@ -2290,14 +2310,14 @@ bool LLFloaterIMContainer::isConversationLoggingAllowed()
return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0;
}
-void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes)
+void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, bool is_flashes, bool alternate_color)
{
//Finds the conversation line item to flash using the session_id
LLConversationViewSession * widget = dynamic_cast<LLConversationViewSession *>(get_ptr_in_map(mConversationsWidgets,session_id));
if (widget)
{
- widget->setFlashState(is_flashes);
+ widget->setFlashState(is_flashes, alternate_color);
}
}