summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llconversationlog.cpp2
-rwxr-xr-xindra/newview/llconversationview.cpp50
-rwxr-xr-xindra/newview/llconversationview.h2
-rw-r--r--indra/newview/llfloaterimcontainer.cpp10
-rw-r--r--indra/newview/llimview.cpp40
-rw-r--r--indra/newview/llnotificationofferhandler.cpp24
-rw-r--r--indra/newview/llspeakers.cpp3
7 files changed, 83 insertions, 48 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 88671a789f..4953bcbd02 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -206,6 +206,8 @@ void LLConversationLog::enableLogging(S32 log_mode)
mLoggingEnabled = log_mode > 0;
if (log_mode > 0)
{
+ mConversations.clear();
+ loadFromFile(getFileName());
LLIMMgr::instance().addSessionObserver(this);
mNewMessageSignalConnection = LLIMModel::instance().addNewMsgCallback(boost::bind(&LLConversationLog::onNewMessageReceived, this, _1));
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 5ac6353daa..441de2e1a5 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -241,20 +241,23 @@ void LLConversationViewSession::draw()
BOOL LLConversationViewSession::handleMouseDown( S32 x, S32 y, MASK mask )
{
- LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem());
- LLUUID session_id = item? item->getUUID() : LLUUID();
- //Will try to select a child node and then itself (if a child was not selected)
+ //Will try to select a child node and then itself (if a child was not selected)
BOOL result = LLFolderViewFolder::handleMouseDown(x, y, mask);
//This node (conversation) was selected and a child (participant) was not
- if(result && getRoot()->getCurSelectedItem() == this)
- {
- LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- im_container->flashConversationItemWidget(session_id,false);
- im_container->selectConversationPair(session_id, false);
- im_container->collapseMessagesPane(false);
- }
-
+ if(result && getRoot())
+ {
+ if(getRoot()->getCurSelectedItem() == this)
+ {
+ LLConversationItem* item = dynamic_cast<LLConversationItem *>(getViewModelItem());
+ LLUUID session_id = item? item->getUUID() : LLUUID();
+
+ LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+ im_container->flashConversationItemWidget(session_id,false);
+ im_container->selectConversationPair(session_id, false);
+ im_container->collapseMessagesPane(false);
+ }
+ }
return result;
}
@@ -375,7 +378,7 @@ void LLConversationViewSession::refresh()
}
}
}
-
+ requestArrange();
// Do the regular upstream refresh
LLFolderViewFolder::refresh();
}
@@ -536,7 +539,7 @@ void LLConversationViewParticipant::addToFolder(LLFolderViewFolder* folder)
LLFolderViewItem::addToFolder(folder);
// Retrieve the folder (conversation) UUID, which is also the speaker session UUID
- LLConversationItem* vmi = this->getParentFolder() ? dynamic_cast<LLConversationItem*>(this->getParentFolder()->getViewModelItem()) : NULL;
+ LLConversationItem* vmi = getParentFolder() ? dynamic_cast<LLConversationItem*>(getParentFolder()->getViewModelItem()) : NULL;
if (vmi)
{
addToSession(vmi->getUUID());
@@ -557,6 +560,27 @@ void LLConversationViewParticipant::onInfoBtnClick()
LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mUUID));
}
+BOOL LLConversationViewParticipant::handleMouseDown( S32 x, S32 y, MASK mask )
+{
+ BOOL result = LLFolderViewItem::handleMouseDown(x, y, mask);
+
+ if(result && getRoot())
+ {
+ if(getRoot()->getCurSelectedItem() == this)
+ {
+ LLConversationItem* vmi = getParentFolder() ? dynamic_cast<LLConversationItem*>(getParentFolder()->getViewModelItem()) : NULL;
+ LLUUID session_id = vmi? vmi->getUUID() : LLUUID();
+
+ LLFloaterIMContainer *im_container = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id);
+ im_container->flashConversationItemWidget(session_id,false);
+ im_container->selectFloater(session_floater);
+ im_container->collapseMessagesPane(false);
+ }
+ }
+ return result;
+}
+
void LLConversationViewParticipant::onMouseEnter(S32 x, S32 y, MASK mask)
{
mInfoBtn->setVisible(true);
diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h
index f2fa2fb042..f9b45073f4 100755
--- a/indra/newview/llconversationview.h
+++ b/indra/newview/llconversationview.h
@@ -138,7 +138,7 @@ public:
void onMouseLeave(S32 x, S32 y, MASK mask);
/*virtual*/ S32 getLabelXPos();
-
+ /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask );
void hideSpeakingIndicator();
protected:
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 5213413aea..c8088588da 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -758,7 +758,9 @@ void LLFloaterIMContainer::assignResizeLimits()
// between the panels are merged into one
S32 number_of_visible_borders = llmin((is_conv_pane_expanded? 2 : 0) + (is_msg_pane_expanded? 2 : 0), 3);
S32 summary_width_of_visible_borders = number_of_visible_borders * LLPANEL_BORDER_WIDTH;
- S32 conv_pane_current_width = is_conv_pane_expanded? mConversationsPane->getRect().getWidth() : mConversationsPane->getMinDim();
+ S32 conv_pane_current_width = is_msg_pane_expanded
+ ? mConversationsPane->getRect().getWidth()
+ : (is_conv_pane_expanded? mConversationsPane->getExpandedMinDim() : mConversationsPane->getMinDim());
S32 msg_pane_min_width = is_msg_pane_expanded ? mMessagesPane->getExpandedMinDim() : 0;
S32 new_min_width = conv_pane_current_width + msg_pane_min_width + summary_width_of_visible_borders;
@@ -1382,7 +1384,9 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool
// Set the focus on the selected floater
if (!session_floater->hasFocus())
{
+ BOOL is_minimized = session_floater->isMinimized();
session_floater->setFocus(TRUE);
+ session_floater->setMinimized(is_minimized);
}
}
@@ -1522,10 +1526,10 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c
if (widget)
{
is_widget_selected = widget->isSelected();
- new_selection = mConversationsRoot->getNextFromChild(widget);
+ new_selection = mConversationsRoot->getNextFromChild(widget, FALSE);
if (!new_selection)
{
- new_selection = mConversationsRoot->getPreviousFromChild(widget);
+ new_selection = mConversationsRoot->getPreviousFromChild(widget, FALSE);
}
widget->destroyView();
}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index cf6a215970..d69bd89f13 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -199,8 +199,14 @@ void on_new_message(const LLSD& msg)
// execution of the action
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
- LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+ if (im_box->isFrontmost() && im_box->getSelectedSession() == session_id)
+ {
+ return;
+ }
+
+ LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation(session_id);
+
//session floater not focused (visible or not)
bool session_floater_not_focused = session_floater && !session_floater->hasFocus();
@@ -250,25 +256,21 @@ void on_new_message(const LLSD& msg)
else if ("flash" == action)
{
- if (conversation_floater_not_focused)
+ if (!gAgent.isDoNotDisturb())
{
- if(!session_floater_is_open && !gAgent.isDoNotDisturb())
- {
- //User is not focused on conversation containing the message
- gToolBarView->flashCommand(LLCommandId("chat"), true);
- }
-
- im_box->flashConversationItemWidget(session_id, true);
-
- //If a DND message, allow notification to be stored so upon DND exit
- //useMostItrusiveIMNotification will be called to notify user a message exists
- if(session_id.notNull()
- && participant_id.notNull()
- && gAgent.isDoNotDisturb())
- {
- LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
- }
- }
+ im_box->flashConversationItemWidget(session_id, true);
+ if(conversation_floater_not_focused)
+ {
+ //User is not focused on conversation containing the message
+ gToolBarView->flashCommand(LLCommandId("chat"), true);
+ }
+ }
+ else if(session_id.notNull() && participant_id.notNull())
+ {
+ //If a DND message, allow notification to be stored so upon DND exit
+ //useMostItrusiveIMNotification will be called to notify user a message exists
+ LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
+ }
}
else if("openconversations" == action && !session_floater_is_open)
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index a2bd96f35a..2657b84ef3 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -96,8 +96,21 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
LLUUID from_id = notification->getPayload()["from_id"];
+ //Will not play a notification sound for inventory and teleport offer based upon chat preference
+ bool playSound = (!notification->isDND()
+ && ((notification->getName() == "UserGiveItem"
+ && gSavedSettings.getBOOL("PlaySoundInventoryOffer"))
+ || (notification->getName() == "TeleportOffered"
+ && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))));
+
+ if(playSound)
+ {
+ notification->playSound();
+ }
+
LLHandlerUtil::spawnIMSession(name, from_id);
LLHandlerUtil::addNotifPanelToIM(notification);
+
}
if (!notification->canShowToast())
@@ -119,17 +132,6 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
if(channel)
channel->addToast(p);
- //Will not play a notification sound for inventory and teleport offer based upon chat preference
- bool playSound = (!notification->isDND()
- && ((notification->getName() == "UserGiveItem"
- && gSavedSettings.getBOOL("PlaySoundInventoryOffer"))
- || (notification->getName() == "TeleportOffered"
- && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))));
-
- if(playSound)
- {
- notification->playSound();
- }
}
if (notification->canLogToIM())
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index a2d8874cea..05df7261e1 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -557,7 +557,8 @@ void LLSpeakerMgr::updateSpeakerList()
// Add only the members who are online
if (member->getOnlineStatus() == "Online")
{
- setSpeaker(member_it->first, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
+ LLPointer<LLSpeaker> speakerp = setSpeaker(member_it->first, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
+ speakerp->mIsModerator = ((member->getAgentPowers() & GP_SESSION_MODERATOR) == GP_SESSION_MODERATOR);
}
++member_it;
}