summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-12-21 15:54:25 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2012-12-21 15:54:25 -0800
commite8be7955d86d0673b35182ba1ae590748b4ba5d2 (patch)
treeab72cdc6e4820772da95c276bfb4d8cead3a01b9 /indra/newview
parented61957b39435db775445f7344cbf1252270eb74 (diff)
parentdd7509f56de5e8a47680b33176e90c11ed518066 (diff)
merging in latest changes'
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llconversationlog.cpp45
-rw-r--r--indra/newview/llimview.cpp17
2 files changed, 30 insertions, 32 deletions
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index eb3a3731ee..e44749fd79 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -236,17 +236,20 @@ void LLConversationLog::logConversation(const LLUUID& session_id, BOOL has_offli
const LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id);
LLConversation* conversation = findConversation(session);
- if (session && conversation)
+ if (session)
{
- if(has_offline_msg)
+ if (conversation)
{
- updateOfflineIMs(session, has_offline_msg);
+ if(has_offline_msg)
+ {
+ updateOfflineIMs(session, has_offline_msg);
+ }
+ updateConversationTimestamp(conversation);
+ }
+ else
+ {
+ createConversation(session);
}
- updateConversationTimestamp(conversation);
- }
- else if (session && !conversation)
- {
- createConversation(session);
}
}
@@ -307,19 +310,17 @@ void LLConversationLog::updateConversationTimestamp(LLConversation* conversation
LLConversation* LLConversationLog::findConversation(const LLIMModel::LLIMSession* session)
{
- if (!session)
+ if (session)
{
- return NULL;
- }
+ const LLUUID session_id = session->isOutgoingAdHoc() ? session->generateOutgouigAdHocHash() : session->mSessionID;
- const LLUUID session_id = session->isOutgoingAdHoc() ? session->generateOutgouigAdHocHash() : session->mSessionID;
-
- conversations_vec_t::iterator conv_it = mConversations.begin();
- for(; conv_it != mConversations.end(); ++conv_it)
- {
- if (conv_it->getSessionID() == session_id)
+ conversations_vec_t::iterator conv_it = mConversations.begin();
+ for(; conv_it != mConversations.end(); ++conv_it)
{
- return &*conv_it;
+ if (conv_it->getSessionID() == session_id)
+ {
+ return &*conv_it;
+ }
}
}
@@ -411,8 +412,8 @@ bool LLConversationLog::saveToFile(const std::string& filename)
// [1343221177] 0 1 0 John Doe| 7e4ec5be-783f-49f5-71dz-16c58c64c145 4ec62a74-c246-0d25-2af6-846beac2aa55 john.doe|
// [1343222639] 2 0 0 Ad-hoc Conference| c3g67c89-c479-4c97-b21d-32869bcfe8rc 68f1c33e-4135-3e3e-a897-8c9b23115c09 Ad-hoc Conference hash597394a0-9982-766d-27b8-c75560213b9a|
- fprintf(fp, "[%d] %d %d %d %s| %s %s %s|\n",
- (S32)conv_it->getTime(),
+ fprintf(fp, "[%ld] %d %d %d %s| %s %s %s|\n",
+ conv_it->getTime(),
(S32)conv_it->getConversationType(),
(S32)0,
(S32)conv_it->hasOfflineMessages(),
@@ -446,7 +447,7 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
char history_file_name[MAX_STRING];
int has_offline_ims;
int stype;
- S32 time;
+ time_t time;
// before CHUI-348 it was a flag of conversation voice state
int prereserved_unused;
@@ -456,7 +457,7 @@ bool LLConversationLog::loadFromFile(const std::string& filename)
part_id_buffer[0] = '\0';
conv_id_buffer[0] = '\0';
- sscanf(buffer, "[%d] %d %d %d %[^|]| %s %s %[^|]|",
+ sscanf(buffer, "[%ld] %d %d %d %[^|]| %s %s %[^|]|",
&time,
&stype,
&prereserved_unused,
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 708400cbe1..d736b81bb7 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -160,6 +160,7 @@ void on_new_message(const LLSD& msg)
//session floater not focused (visible or not)
bool session_floater_not_focused = session_floater && !session_floater->hasFocus();
+
//conv. floater is closed
bool conversation_floater_is_closed =
!( im_box
@@ -210,20 +211,16 @@ void on_new_message(const LLSD& msg)
else if ("flash" == action)
{
- if (session_floater_not_focused)
+ if (conversation_floater_not_focused)
{
- //User is not focused on conversation containing the message
-
- if(conversation_floater_not_focused)
+ if(session_floater_not_focused)
{
+ //User is not focused on conversation containing the message
gToolBarView->flashCommand(LLCommandId("chat"), true);
}
- //conversation floater is open but a different conversation is focused
- //else
- //{
- im_box->flashConversationItemWidget(session_id, true);
- //}
- }
+
+ im_box->flashConversationItemWidget(session_id, true);
+ }
}
else if("openconversations" == action)