summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-10-29 20:43:32 -0700
committerMerov Linden <merov@lindenlab.com>2012-10-29 20:43:32 -0700
commita7a24dc2f9450e0d51e7110a7eb44e0f27a010db (patch)
tree296b5344b33734babfde6aeecb36af2e005ddc32 /indra/newview
parent480c3a1acb32e98d0d64aaf7bb70e4d61e6882f6 (diff)
parent1a1a0b91c0c4400ec3febac183124314f9226127 (diff)
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llavataractions.cpp6
-rw-r--r--indra/newview/llchiclet.cpp3
-rwxr-xr-xindra/newview/llconversationview.cpp27
-rw-r--r--indra/newview/llgroupactions.cpp4
-rw-r--r--indra/newview/llimconversation.cpp11
-rw-r--r--indra/newview/llimfloater.cpp17
-rw-r--r--indra/newview/llimfloater.h2
-rw-r--r--indra/newview/llimfloatercontainer.cpp186
-rw-r--r--indra/newview/llimfloatercontainer.h6
-rw-r--r--indra/newview/llimview.cpp34
-rw-r--r--indra/newview/llimview.h7
-rw-r--r--indra/newview/llinventorybridge.cpp4
-rw-r--r--indra/newview/llinventorypanel.cpp4
-rw-r--r--indra/newview/llnearbychat.cpp12
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp17
-rw-r--r--indra/newview/llspeakingindicatormanager.cpp2
16 files changed, 137 insertions, 205 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 7322b3bb0b..13262efb3b 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -56,6 +56,7 @@
#include "llinventorybridge.h"
#include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType
#include "llinventorypanel.h"
+#include "llimfloatercontainer.h"
#include "llimview.h" // for gIMMgr
#include "llmutelist.h"
#include "llnotificationsutil.h" // for LLNotificationsUtil
@@ -67,7 +68,6 @@
#include "llviewerobjectlist.h"
#include "llviewermessage.h" // for handle_lure
#include "llviewerregion.h"
-#include "llimfloater.h"
#include "lltrans.h"
#include "llcallingcard.h"
#include "llslurl.h" // IDEVO
@@ -184,7 +184,7 @@ static void on_avatar_name_cache_start_im(const LLUUID& agent_id,
LLUUID session_id = gIMMgr->addSession(name, IM_NOTHING_SPECIAL, agent_id);
if (session_id != LLUUID::null)
{
- LLIMFloater::show(session_id);
+ LLIMFloaterContainer::getInstance()->showConversation(session_id);
}
make_ui_sound("UISndStartIM");
}
@@ -302,7 +302,7 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float
return;
}
- LLIMFloater::show(session_id);
+ LLIMFloaterContainer::getInstance()->showConversation(session_id);
make_ui_sound("UISndStartIM");
}
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 17181edffc..e328186fd6 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -34,6 +34,7 @@
#include "llgroupactions.h"
#include "lliconctrl.h"
#include "llimfloater.h"
+#include "llimfloatercontainer.h"
#include "llimview.h"
#include "llfloaterreg.h"
#include "lllocalcliprect.h"
@@ -1196,7 +1197,7 @@ void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id)
chiclet->setShowSpeaker(true);
if (gSavedSettings.getBOOL("OpenIMOnVoice"))
{
- LLIMFloater::show(chiclet->getSessionId());
+ LLIMFloaterContainer::getInstance()->showConversation(session_id);
}
}
}
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 2d5665190f..3082284991 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -438,28 +438,19 @@ void LLConversationViewParticipant::selectItem()
LLIMFloaterContainer* container = LLIMFloaterContainer::getInstance();
LLFloater* session_floater;
- //Only execute when switching floaters (conversations)
- if(vmi && vmi->getUUID() != container->getSelectedSession())
+ if(vmi)
{
- //When null, show the nearby chat conversation floater
- if(vmi->getUUID().isNull())
- {
- LLNearbyChat* nearbyChat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat");
- nearbyChat->show();
- }
- //Otherwise, show the IM conversation floater
- else
+ session_floater = LLIMConversation::getConversation(vmi->getUUID());
+
+ //Only execute when switching floaters (conversations)
+ if(vmi->getUUID() != container->getSelectedSession())
{
- LLIMFloater::show(vmi->getUUID());
+ container->selectFloater(session_floater);
+ // Store the active session
+ container->setSelectedSession(vmi->getUUID());
}
- // Store the active session
- container->setSelectedSession(vmi->getUUID());
- }
- //Focus the current conversation floater (it is already visible so just focus it)
- else
- {
- session_floater = LLIMConversation::getConversation(vmi->getUUID());
+ //Redirect focus to the conversation floater
session_floater->setFocus(TRUE);
}
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 623ebb76f2..15eca39bce 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -36,10 +36,10 @@
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
#include "llgroupmgr.h"
+#include "llimfloatercontainer.h"
#include "llimview.h" // for gIMMgr
#include "llnotificationsutil.h"
#include "llstatusbar.h" // can_afford_transaction()
-#include "llimfloater.h"
#include "groupchatlistener.h"
//
@@ -335,7 +335,7 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id)
group_id);
if (session_id != LLUUID::null)
{
- LLIMFloater::show(session_id);
+ LLIMFloaterContainer::getInstance()->showConversation(session_id);
}
make_ui_sound("UISndStartIM");
return session_id;
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index f2421dd78f..3b6294f43b 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -238,16 +238,9 @@ void LLIMConversation::onFocusReceived()
{
setBackgroundOpaque(true);
- if (mSessionID.notNull())
+ if (mSessionID.notNull() && isInVisibleChain())
{
- LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true);
-
- if (getVisible())
- {
- // suppress corresponding toast only if this floater is visible and have focus
- LLIMModel::getInstance()->setActiveSessionID(mSessionID);
- LLIMModel::instance().sendNoUnreadMessages(mSessionID);
- }
+ LLIMModel::instance().sendNoUnreadMessages(mSessionID);
}
LLTransientDockableFloater::onFocusReceived();
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 560b3fa60a..6d90b6a0b2 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -582,7 +582,7 @@ void LLIMFloater::onParticipantsListChanged(LLUICtrl* ctrl)
}
}
-void LLIMFloater::addToHost(const LLUUID& session_id, const bool force)
+void LLIMFloater::addToHost(const LLUUID& session_id)
{
if (!LLIMConversation::isChatMultiTab() || !gIMMgr->hasSession(session_id))
{
@@ -604,20 +604,7 @@ void LLIMFloater::addToHost(const LLUUID& session_id, const bool force)
LLTabContainer::eInsertionPoint i_pt = LLTabContainer::END;
if (floater_container)
{
- floater_container->addFloater(floater, TRUE, i_pt);
- }
- }
-
- if (force)
- {
- if (floater_container && floater_container->getVisible())
- {
- floater->openFloater(floater->getKey());
- floater->setVisible(TRUE);
- }
- else
- {
- floater->setVisible(FALSE);
+ floater_container->addFloater(floater, FALSE, i_pt);
}
}
}
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 26daf00afd..8a0d6f10e0 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -72,7 +72,7 @@ public:
static LLIMFloater* findInstance(const LLUUID& session_id);
static LLIMFloater* getInstance(const LLUUID& session_id);
- static void addToHost(const LLUUID& session_id, const bool force = false);
+ static void addToHost(const LLUUID& session_id);
// LLFloater overrides
/*virtual*/ void onClose(bool app_quitting);
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 297db96c83..01456fee3b 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -98,19 +98,19 @@ LLIMFloaterContainer::~LLIMFloaterContainer()
void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
{
- addConversationListItem(session_id, true);
- LLIMFloater::addToHost(session_id, true);
+ addConversationListItem(session_id);
+ LLIMFloater::addToHost(session_id);
}
void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
{
- setItemSelect(session_id);
+ selectConversation(session_id);
}
void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id)
{
- addConversationListItem(session_id, true);
- LLIMFloater::addToHost(session_id, true);
+ addConversationListItem(session_id);
+ LLIMFloater::addToHost(session_id);
}
void LLIMFloaterContainer::sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id)
@@ -129,7 +129,7 @@ void LLIMFloaterContainer::onCurrentChannelChanged(const LLUUID& session_id)
{
if (session_id != LLUUID::null)
{
- LLIMFloater::show(session_id);
+ LLIMFloaterContainer::getInstance()->showConversation(session_id);
}
}
@@ -223,6 +223,7 @@ BOOL LLIMFloaterContainer::postBuild()
void LLIMFloaterContainer::onOpen(const LLSD& key)
{
LLMultiFloater::onOpen(key);
+ openNearbyChat();
}
// virtual
@@ -525,6 +526,7 @@ void LLIMFloaterContainer::setVisible(BOOL visible)
LLSD name("nearby_chat");
LLFloaterReg::toggleInstanceOrBringToFront(name);
}
+ openNearbyChat();
}
nearby_chat = LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat");
@@ -840,62 +842,64 @@ void LLIMFloaterContainer::doToParticipants(const std::string& command, uuid_vec
if(selectedIDS.size() > 0)
{
const LLUUID& userID = selectedIDS.front();
-
- if ("view_profile" == command)
- {
- LLAvatarActions::showProfile(userID);
- }
- else if("im" == command)
- {
- LLAvatarActions::startIM(userID);
- }
- else if("offer_teleport" == command)
- {
- LLAvatarActions::offerTeleport(selectedIDS);
- }
- else if("voice_call" == command)
- {
- LLAvatarActions::startCall(userID);
- }
- else if("chat_history" == command)
- {
- LLAvatarActions::viewChatHistory(userID);
- }
- else if("add_friend" == command)
- {
- LLAvatarActions::requestFriendshipDialog(userID);
- }
- else if("remove_friend" == command)
- {
- LLAvatarActions::removeFriendDialog(userID);
- }
- else if("invite_to_group" == command)
- {
- LLAvatarActions::inviteToGroup(userID);
- }
- else if("map" == command)
- {
- LLAvatarActions::showOnMap(userID);
- }
- else if("share" == command)
- {
- LLAvatarActions::share(userID);
- }
- else if("pay" == command)
+ if(gAgent.getID() != userID)
{
- LLAvatarActions::pay(userID);
- }
- else if("block_unblock" == command)
- {
- LLAvatarActions::toggleBlock(userID);
- }
- else if("selected" == command || "mute_all" == command || "unmute_all" == command)
- {
- moderateVoice(command, userID);
- }
- else if ("toggle_allow_text_chat" == command)
- {
- toggleAllowTextChat(userID);
+ if ("view_profile" == command)
+ {
+ LLAvatarActions::showProfile(userID);
+ }
+ else if("im" == command)
+ {
+ LLAvatarActions::startIM(userID);
+ }
+ else if("offer_teleport" == command)
+ {
+ LLAvatarActions::offerTeleport(selectedIDS);
+ }
+ else if("voice_call" == command)
+ {
+ LLAvatarActions::startCall(userID);
+ }
+ else if("chat_history" == command)
+ {
+ LLAvatarActions::viewChatHistory(userID);
+ }
+ else if("add_friend" == command)
+ {
+ LLAvatarActions::requestFriendshipDialog(userID);
+ }
+ else if("remove_friend" == command)
+ {
+ LLAvatarActions::removeFriendDialog(userID);
+ }
+ else if("invite_to_group" == command)
+ {
+ LLAvatarActions::inviteToGroup(userID);
+ }
+ else if("map" == command)
+ {
+ LLAvatarActions::showOnMap(userID);
+ }
+ else if("share" == command)
+ {
+ LLAvatarActions::share(userID);
+ }
+ else if("pay" == command)
+ {
+ LLAvatarActions::pay(userID);
+ }
+ else if("block_unblock" == command)
+ {
+ LLAvatarActions::toggleBlock(userID);
+ }
+ else if("selected" == command || "mute_all" == command || "unmute_all" == command)
+ {
+ moderateVoice(command, userID);
+ }
+ else if ("toggle_allow_text_chat" == command)
+ {
+ toggleAllowTextChat(userID);
+ }
}
}
}
@@ -1104,39 +1108,22 @@ bool LLIMFloaterContainer::checkContextMenuItem(const LLSD& userdata)
return false;
}
+void LLIMFloaterContainer::showConversation(const LLUUID& session_id)
+{
+ setVisibleAndFrontmost(false);
+ selectConversation(session_id);
+}
+
// Will select only the conversation item
-void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id)
+void LLIMFloaterContainer::selectConversation(const LLUUID& session_id)
{
LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id);
- if (widget && (mSelectedSession != session_id))
+ if (widget)
{
- mSelectedSession = session_id;
(widget->getRoot())->setSelection(widget, FALSE, FALSE);
}
}
-// Will select the conversation/participant item
-void LLIMFloaterContainer::setItemSelect(const LLUUID& session_id)
-{
-
- if(mConversationsRoot->getCurSelectedItem() && mConversationsRoot->getCurSelectedItem()->getParentFolder())
- {
- //Retreive the conversation id. When a participant is selected, then have to to get the converation id from the parent.
- LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(mConversationsRoot->getCurSelectedItem()->getParentFolder()->getViewModelItem());
-
- //Will allow selection/highlighting of the conversation/participant
- if(session_id != vmi->getUUID())
- {
- mSelectedSession = session_id;
- LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id);
- (widget->getRoot())->setSelection(widget, FALSE, FALSE);
-
- // Scroll to selected item
- mConversationsRoot->scrollToShowSelection();
- }
- }
-}
-
void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id)
{
@@ -1238,16 +1225,15 @@ LLConversationItem* LLIMFloaterContainer::addConversationListItem(const LLUUID&
conversation_floater->buildConversationViewParticipant();
}
- if (isWidgetSelected)
- {
- setConvItemSelect(uuid);
- }
-
// set the widget to minimized mode if conversations pane is collapsed
widget->toggleMinimizedMode(mConversationsPane->isCollapsed());
- // scroll to newly added item
- mConversationsRoot->scrollToShowSelection();
+ if (isWidgetSelected)
+ {
+ selectConversation(uuid);
+ // scroll to newly added item
+ mConversationsRoot->scrollToShowSelection();
+ }
return item;
}
@@ -1502,4 +1488,18 @@ void LLIMFloaterContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
}
}
+void LLIMFloaterContainer::openNearbyChat()
+{
+ // If there's only one conversation in the container and that conversation is the nearby chat
+ //(which it should be...), open it so to make the list of participants visible. This happens to be the most common case when opening the Chat floater.
+ if(mConversationsItems.size() == 1)
+ {
+ LLConversationViewSession* nearby_chat = dynamic_cast<LLConversationViewSession*>(mConversationsWidgets[LLUUID()]);
+ if (nearby_chat)
+ {
+ nearby_chat->setOpen(TRUE);
+ }
+ }
+}
+
// EOF
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index 45a40b8964..cc6cc8c464 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -65,8 +65,9 @@ public:
/*virtual*/ void addFloater(LLFloater* floaterp,
BOOL select_added_floater,
LLTabContainer::eInsertionPoint insertion_point = LLTabContainer::END);
- void setConvItemSelect(const LLUUID& session_id);
- void setItemSelect(const LLUUID& session_id);
+
+ void showConversation(const LLUUID& session_id);
+ void selectConversation(const LLUUID& session_id);
/*virtual*/ void tabClose();
static LLFloater* getCurrentVoiceFloater();
@@ -139,6 +140,7 @@ private:
void moderateVoiceAllParticipants(bool unmute);
void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute);
void toggleAllowTextChat(const LLUUID& participant_uuid);
+ void openNearbyChat();
LLButton* mExpandCollapseBtn;
LLLayoutPanel* mMessagesPane;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 115da54ec8..d5f1e81933 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -49,6 +49,7 @@
#include "llcallingcard.h"
#include "llchat.h"
#include "llimfloater.h"
+#include "llimfloatercontainer.h"
#include "llgroupiconctrl.h"
#include "llmd5.h"
#include "llmutelist.h"
@@ -108,7 +109,7 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id,
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()));
+ LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloaterContainer::showConversation, LLIMFloaterContainer::getInstance(), msg["session_id"].asUUID()));
}
void toast_callback(const LLSD& msg){
@@ -118,12 +119,12 @@ void toast_callback(const LLSD& msg){
return;
}
- // check whether incoming IM belongs to an active session or not
- if (LLIMModel::getInstance()->getActiveSessionID().notNull()
- && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"])
- {
- return;
- }
+ // Skip toasting if we have open window of IM with this session id
+ LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]);
+ if (open_im_floater && open_im_floater->isInVisibleChain() && open_im_floater->hasFocus())
+ {
+ return;
+ }
// Skip toasting for system messages
if (msg["from_id"].asUUID() == LLUUID::null)
@@ -145,30 +146,11 @@ void toast_callback(const LLSD& msg){
return;
}
- // Skip toasting if we have open window of IM with this session id
- LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]);
- if (open_im_floater && open_im_floater->getVisible())
- {
- return;
- }
-
LLAvatarNameCache::get(msg["from_id"].asUUID(),
boost::bind(&on_avatar_name_cache_toast,
_1, _2, msg));
}
-void LLIMModel::setActiveSessionID(const LLUUID& session_id)
-{
- // check if such an ID really exists
- if (!findIMSession(session_id))
- {
- llwarns << "Trying to set as active a non-existent session!" << llendl;
- return;
- }
-
- mActiveSessionID = session_id;
-}
-
LLIMModel::LLIMModel()
{
addNewMsgCallback(boost::bind(&LLIMFloater::newIMCallback, _1));
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 00b67f520c..054388bc6c 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -147,13 +147,6 @@ public:
LLIMModel();
-
- //we should control the currently active session
- LLUUID mActiveSessionID;
- void setActiveSessionID(const LLUUID& session_id);
- void resetActiveSessionID() { mActiveSessionID.setNull(); }
- LLUUID getActiveSessionID() { return mActiveSessionID; }
-
/** Session id to session object */
std::map<LLUUID, LLIMSession*> mId2SessionMap;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 28c2edbe84..5d8d82b226 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -46,7 +46,7 @@
#include "llfriendcard.h"
#include "llgesturemgr.h"
#include "llgiveinventory.h"
-#include "llimfloater.h"
+#include "llimfloatercontainer.h"
#include "llimview.h"
#include "llclipboard.h"
#include "llinventorydefines.h"
@@ -4704,7 +4704,7 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act
LLUUID session_id = gIMMgr->addSession(callingcard_name, IM_NOTHING_SPECIAL, item->getCreatorUUID());
if (session_id != LLUUID::null)
{
- LLIMFloater::show(session_id);
+ LLIMFloaterContainer::getInstance()->showConversation(session_id);
}
}
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index a8d99ad7de..dafc71b59c 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -39,7 +39,7 @@
#include "llfloatersidepanelcontainer.h"
#include "llfolderview.h"
#include "llfolderviewitem.h"
-#include "llimfloater.h"
+#include "llimfloatercontainer.h"
#include "llimview.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@@ -1087,7 +1087,7 @@ bool LLInventoryPanel::beginIMSession()
LLUUID session_id = gIMMgr->addSession(name, type, members[0], members);
if (session_id != LLUUID::null)
{
- LLIMFloater::show(session_id);
+ LLIMFloaterContainer::getInstance()->showConversation(session_id);
}
return true;
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index a89ae4a2dc..5b274dd389 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -287,10 +287,10 @@ void LLNearbyChat::setVisible(BOOL visible)
{
LLIMConversation::setVisible(visible);
- if(visible)
- {
- removeScreenChat();
- }
+ if(visible)
+ {
+ removeScreenChat();
+ }
setFocus(visible);
}
@@ -327,7 +327,7 @@ void LLNearbyChat::addToHost()
mIsHostSet = true;
}
-}
+ }
bool LLNearbyChat::isHostSet()
{
@@ -722,7 +722,7 @@ void LLNearbyChat::sendChatFromViewer(const LLWString &wtext, EChatType type, BO
send_chat_from_viewer(utf8_out_text, type, channel);
}
-// static
+// static
bool LLNearbyChat::isWordsName(const std::string& name)
{
// checking to see if it's display name plus username in parentheses
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 9fd73746e8..b4e8927879 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -93,13 +93,6 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
}
else
{
- // store active session id
- const LLUUID & active_session_id =
- LLIMModel::instance().getActiveSessionID();
-
- // set searched session as active to avoid IM toast popup
- LLIMModel::instance().setActiveSessionID(session_id);
-
S32 unread = session->mNumUnread;
S32 participant_unread = session->mParticipantUnreadMessageCount;
LLIMModel::instance().addMessageSilently(session_id, from, from_id,
@@ -110,16 +103,6 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
// update IM floater messages
updateIMFLoaterMesages(session_id);
-
- // restore active session id
- if (active_session_id.isNull())
- {
- LLIMModel::instance().resetActiveSessionID();
- }
- else
- {
- LLIMModel::instance().setActiveSessionID(active_session_id);
- }
}
}
diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp
index 9b38bf22ff..900379ae1e 100644
--- a/indra/newview/llspeakingindicatormanager.cpp
+++ b/indra/newview/llspeakingindicatormanager.cpp
@@ -241,7 +241,7 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea
BOOL switch_current_on = switch_on;
// we should show indicator for specified voice session only if this is current channel. EXT-5562.
- if (switch_current_on && indicator->getTargetSessionID().notNull())
+ if (switch_current_on)
{
switch_current_on = indicator->getTargetSessionID() == session_id;
LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL;