summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authormberezhnoy <mberezhnoy@productengine.com>2013-01-24 10:41:32 +0200
committermberezhnoy <mberezhnoy@productengine.com>2013-01-24 10:41:32 +0200
commita15854213b6212b291099b429867f198b572f9ae (patch)
treeff17e9c7e38cb2d723a206679cbeb5585f9db08f /indra/newview/llfloaterimcontainer.cpp
parent651f230500646dfcd695a9caa0650f81fa29b9bf (diff)
parenta0112d6d78b17c5771b7b151d2fb9340bece3137 (diff)
merging into latest changes
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 062a92b520..ff6234fa27 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -431,7 +431,9 @@ bool LLFloaterIMContainer::onConversationModelEvent(const LLSD& event)
return false;
}
LLConversationViewParticipant* participant_view = session_view->findParticipant(participant_id);
- LLFloaterIMSessionTab *conversation_floater = (session_id.isNull() ? (LLFloaterIMSessionTab*)(LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")) : (LLFloaterIMSessionTab*)(LLFloaterIMSession::findInstance(session_id)));
+ LLFloaterIMSessionTab *conversation_floater = (session_id.isNull() ?
+ (LLFloaterIMSessionTab*)(LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"))
+ : (LLFloaterIMSessionTab*)(LLFloaterIMSession::findInstance(session_id)));
if (type == "remove_participant")
{
@@ -813,6 +815,10 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata)
floater_prefp->selectPrivacyPanel();
}
}
+ if ("Translating.Toggle" == command)
+ {
+ gSavedSettings.setBOOL("TranslateChat", !gSavedSettings.getBOOL("TranslateChat"));
+ }
}
BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata)
@@ -843,7 +849,14 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata)
{
return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE);
}
-
+ if ("Translating.Enabled" == command)
+ {
+ return gSavedPerAccountSettings.getBOOL("TranslatingEnabled");
+ }
+ if ("Translating.On" == command)
+ {
+ return gSavedSettings.getBOOL("TranslateChat");
+ }
return FALSE;
}
@@ -1299,11 +1312,14 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
if (widget && widget->getParentFolder())
{
widget->getParentFolder()->setSelection(widget, FALSE, FALSE);
- if(gAgent.isDoNotDisturb())
- {
- LLDoNotDisturbNotificationStorage::getInstance()->removeIMNotification(session_id);
- }
}
+
+ //When in DND mode, remove stored IM notifications
+ //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal
+ if(gAgent.isDoNotDisturb() && session_id.notNull())
+ {
+ LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, session_id);
+ }
}
/* floater processing */
@@ -1324,11 +1340,6 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
// Switch to the conversation floater that is being selected
selectFloater(session_floater);
}
-
- if(gAgent.isDoNotDisturb())
- {
- LLDoNotDisturbNotificationStorage::getInstance()->removeIMNotification(session_id);
- }
}
// Set the focus on the selected floater