Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
788b08f5
Commit
788b08f5
authored
15 years ago
by
Eugene Mutavchi
Browse files
Options
Downloads
Patches
Plain Diff
Fixed normal bug EXT-1877([BSI] Offline status not showing in IMs)
--HG-- branch : product-engine
parent
7691860f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llcallingcard.cpp
+2
-13
2 additions, 13 deletions
indra/newview/llcallingcard.cpp
indra/newview/llimview.cpp
+26
-9
26 additions, 9 deletions
indra/newview/llimview.cpp
indra/newview/llimview.h
+6
-1
6 additions, 1 deletion
indra/newview/llimview.h
with
34 additions
and
23 deletions
indra/newview/llcallingcard.cpp
+
2
−
13
View file @
788b08f5
...
@@ -62,7 +62,6 @@
...
@@ -62,7 +62,6 @@
#include
"llviewerwindow.h"
#include
"llviewerwindow.h"
#include
"llvoavatar.h"
#include
"llvoavatar.h"
#include
"llimview.h"
#include
"llimview.h"
#include
"llimpanel.h"
///----------------------------------------------------------------------------
///----------------------------------------------------------------------------
/// Local function declarations, constants, enums, and typedefs
/// Local function declarations, constants, enums, and typedefs
...
@@ -719,18 +718,8 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
...
@@ -719,18 +718,8 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online)
// If there's an open IM session with this agent, send a notification there too.
// If there's an open IM session with this agent, send a notification there too.
LLUUID
session_id
=
LLIMMgr
::
computeSessionID
(
IM_NOTHING_SPECIAL
,
agent_id
);
LLUUID
session_id
=
LLIMMgr
::
computeSessionID
(
IM_NOTHING_SPECIAL
,
agent_id
);
LLFloaterIMPanel
*
floater
=
gIMMgr
->
findFloaterBySession
(
session_id
);
std
::
string
notify_msg
=
notification
->
getMessage
();
if
(
floater
)
LLIMModel
::
instance
().
proccessOnlineOfflineNotification
(
session_id
,
notify_msg
);
{
std
::
string
notifyMsg
=
notification
->
getMessage
();
if
(
!
notifyMsg
.
empty
())
{
floater
->
addHistoryLine
(
notifyMsg
,
LLUIColorTable
::
instance
().
getColor
(
"SystemChatColor"
));
}
}
//*TODO instead of adding IM message about online/offline status
//do something like graying avatar icon on messages from a user that went offline, and make it colored when online.
}
}
mModifyMask
|=
LLFriendObserver
::
ONLINE
;
mModifyMask
|=
LLFriendObserver
::
ONLINE
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llimview.cpp
+
26
−
9
View file @
788b08f5
...
@@ -105,7 +105,13 @@ void toast_callback(const LLSD& msg){
...
@@ -105,7 +105,13 @@ void toast_callback(const LLSD& msg){
{
{
return
;
return
;
}
}
// Skip toasting for system messages
if
(
msg
[
"from_id"
].
asUUID
()
==
LLUUID
::
null
)
{
return
;
}
LLSD
args
;
LLSD
args
;
args
[
"MESSAGE"
]
=
msg
[
"message"
];
args
[
"MESSAGE"
]
=
msg
[
"message"
];
args
[
"TIME"
]
=
msg
[
"time"
];
args
[
"TIME"
]
=
msg
[
"time"
];
...
@@ -403,6 +409,23 @@ bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, con
...
@@ -403,6 +409,23 @@ bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, con
return
false
;
return
false
;
}
}
bool
LLIMModel
::
proccessOnlineOfflineNotification
(
const
LLUUID
&
session_id
,
const
std
::
string
&
utf8_text
)
{
// Add message to old one floater
LLFloaterIMPanel
*
floater
=
gIMMgr
->
findFloaterBySession
(
session_id
);
if
(
floater
)
{
if
(
!
utf8_text
.
empty
()
)
{
floater
->
addHistoryLine
(
utf8_text
,
LLUIColorTable
::
instance
().
getColor
(
"SystemChatColor"
));
}
}
// Add system message to history
return
addMessage
(
session_id
,
SYSTEM_FROM
,
LLUUID
::
null
,
utf8_text
);
}
bool
LLIMModel
::
addMessage
(
const
LLUUID
&
session_id
,
const
std
::
string
&
from
,
const
LLUUID
&
from_id
,
bool
LLIMModel
::
addMessage
(
const
LLUUID
&
session_id
,
const
std
::
string
&
from
,
const
LLUUID
&
from_id
,
const
std
::
string
&
utf8_text
,
bool
log2file
/* = true */
)
{
const
std
::
string
&
utf8_text
,
bool
log2file
/* = true */
)
{
LLIMSession
*
session
=
findIMSession
(
session_id
);
LLIMSession
*
session
=
findIMSession
(
session_id
);
...
@@ -2013,7 +2036,7 @@ void LLIMMgr::noteOfflineUsers(
...
@@ -2013,7 +2036,7 @@ void LLIMMgr::noteOfflineUsers(
{
{
const
LLRelationship
*
info
=
NULL
;
const
LLRelationship
*
info
=
NULL
;
LLAvatarTracker
&
at
=
LLAvatarTracker
::
instance
();
LLAvatarTracker
&
at
=
LLAvatarTracker
::
instance
();
LLIMModel
*
im_model
=
LLIMModel
::
getI
nstance
();
LLIMModel
&
im_model
=
LLIMModel
::
i
nstance
();
for
(
S32
i
=
0
;
i
<
count
;
++
i
)
for
(
S32
i
=
0
;
i
<
count
;
++
i
)
{
{
info
=
at
.
getBuddyInfo
(
ids
.
get
(
i
));
info
=
at
.
getBuddyInfo
(
ids
.
get
(
i
));
...
@@ -2024,13 +2047,7 @@ void LLIMMgr::noteOfflineUsers(
...
@@ -2024,13 +2047,7 @@ void LLIMMgr::noteOfflineUsers(
LLUIString
offline
=
LLTrans
::
getString
(
"offline_message"
);
LLUIString
offline
=
LLTrans
::
getString
(
"offline_message"
);
offline
.
setArg
(
"[FIRST]"
,
first
);
offline
.
setArg
(
"[FIRST]"
,
first
);
offline
.
setArg
(
"[LAST]"
,
last
);
offline
.
setArg
(
"[LAST]"
,
last
);
im_model
.
proccessOnlineOfflineNotification
(
session_id
,
offline
);
if
(
floater
)
{
floater
->
addHistoryLine
(
offline
,
LLUIColorTable
::
instance
().
getColor
(
"SystemChatColor"
));
}
im_model
->
addMessage
(
session_id
,
SYSTEM_FROM
,
LLUUID
::
null
,
offline
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llimview.h
+
6
−
1
View file @
788b08f5
...
@@ -136,7 +136,12 @@ class LLIMModel : public LLSingleton<LLIMModel>
...
@@ -136,7 +136,12 @@ class LLIMModel : public LLSingleton<LLIMModel>
* It sends new message signal for each added message.
* It sends new message signal for each added message.
*/
*/
bool
addMessage
(
const
LLUUID
&
session_id
,
const
std
::
string
&
from
,
const
LLUUID
&
other_participant_id
,
const
std
::
string
&
utf8_text
,
bool
log2file
=
true
);
bool
addMessage
(
const
LLUUID
&
session_id
,
const
std
::
string
&
from
,
const
LLUUID
&
other_participant_id
,
const
std
::
string
&
utf8_text
,
bool
log2file
=
true
);
/**
* Add a system message to an IM Model
*/
bool
proccessOnlineOfflineNotification
(
const
LLUUID
&
session_id
,
const
std
::
string
&
utf8_text
);
/**
/**
* Get a session's name.
* Get a session's name.
* For a P2P chat - it's an avatar's name,
* For a P2P chat - it's an avatar's name,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment