Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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
JennaHuntsman
XDG Integration
Commits
bd42fd13
Commit
bd42fd13
authored
5 years ago
by
andreykproductengine
Browse files
Options
Downloads
Patches
Plain Diff
SL-11719 Fixed init of conversation log
parent
5ce0d626
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/llconversationlog.cpp
+14
-10
14 additions, 10 deletions
indra/newview/llconversationlog.cpp
indra/newview/llconversationlog.h
+7
-1
7 additions, 1 deletion
indra/newview/llconversationlog.h
indra/newview/llstartup.cpp
+6
-6
6 additions, 6 deletions
indra/newview/llstartup.cpp
with
27 additions
and
17 deletions
indra/newview/llconversationlog.cpp
+
14
−
10
View file @
bd42fd13
...
@@ -189,16 +189,6 @@ LLConversationLog::LLConversationLog() :
...
@@ -189,16 +189,6 @@ LLConversationLog::LLConversationLog() :
mAvatarNameCacheConnection
(),
mAvatarNameCacheConnection
(),
mLoggingEnabled
(
false
)
mLoggingEnabled
(
false
)
{
{
if
(
gSavedPerAccountSettings
.
controlExists
(
"KeepConversationLogTranscripts"
))
{
LLControlVariable
*
keep_log_ctrlp
=
gSavedPerAccountSettings
.
getControl
(
"KeepConversationLogTranscripts"
).
get
();
S32
log_mode
=
keep_log_ctrlp
->
getValue
();
keep_log_ctrlp
->
getSignal
()
->
connect
(
boost
::
bind
(
&
LLConversationLog
::
enableLogging
,
this
,
_2
));
if
(
log_mode
>
0
)
{
enableLogging
(
log_mode
);
}
}
}
}
void
LLConversationLog
::
enableLogging
(
S32
log_mode
)
void
LLConversationLog
::
enableLogging
(
S32
log_mode
)
...
@@ -443,6 +433,20 @@ bool LLConversationLog::moveLog(const std::string &originDirectory, const std::s
...
@@ -443,6 +433,20 @@ bool LLConversationLog::moveLog(const std::string &originDirectory, const std::s
return
true
;
return
true
;
}
}
void
LLConversationLog
::
initLoggingState
()
{
if
(
gSavedPerAccountSettings
.
controlExists
(
"KeepConversationLogTranscripts"
))
{
LLControlVariable
*
keep_log_ctrlp
=
gSavedPerAccountSettings
.
getControl
(
"KeepConversationLogTranscripts"
).
get
();
S32
log_mode
=
keep_log_ctrlp
->
getValue
();
keep_log_ctrlp
->
getSignal
()
->
connect
(
boost
::
bind
(
&
LLConversationLog
::
enableLogging
,
this
,
_2
));
if
(
log_mode
>
0
)
{
enableLogging
(
log_mode
);
}
}
}
std
::
string
LLConversationLog
::
getFileName
()
std
::
string
LLConversationLog
::
getFileName
()
{
{
std
::
string
filename
=
"conversation"
;
std
::
string
filename
=
"conversation"
;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llconversationlog.h
+
7
−
1
View file @
bd42fd13
...
@@ -107,7 +107,7 @@ class LLConversation
...
@@ -107,7 +107,7 @@ class LLConversation
* To distinguish two conversations with the same sessionID it's also needed to compare their creation date.
* To distinguish two conversations with the same sessionID it's also needed to compare their creation date.
*/
*/
class
LLConversationLog
:
public
LL
Param
Singleton
<
LLConversationLog
>
,
LLIMSessionObserver
class
LLConversationLog
:
public
LLSingleton
<
LLConversationLog
>
,
LLIMSessionObserver
{
{
LLSINGLETON
(
LLConversationLog
);
LLSINGLETON
(
LLConversationLog
);
public:
public:
...
@@ -147,6 +147,12 @@ class LLConversationLog : public LLParamSingleton<LLConversationLog>, LLIMSessio
...
@@ -147,6 +147,12 @@ class LLConversationLog : public LLParamSingleton<LLConversationLog>, LLIMSessio
bool
getIsLoggingEnabled
()
{
return
mLoggingEnabled
;
}
bool
getIsLoggingEnabled
()
{
return
mLoggingEnabled
;
}
bool
isLogEmpty
()
{
return
mConversations
.
empty
();
}
bool
isLogEmpty
()
{
return
mConversations
.
empty
();
}
/**
* inits connection to per account settings,
* loads saved file and inits enabled state
*/
void
initLoggingState
();
/**
/**
* constructs file name in which conversations log will be saved
* constructs file name in which conversations log will be saved
* file name is conversation.log
* file name is conversation.log
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llstartup.cpp
+
6
−
6
View file @
bd42fd13
...
@@ -942,12 +942,6 @@ bool idle_startup()
...
@@ -942,12 +942,6 @@ bool idle_startup()
LLFile
::
mkdir
(
gDirUtilp
->
getChatLogsDir
());
LLFile
::
mkdir
(
gDirUtilp
->
getChatLogsDir
());
LLFile
::
mkdir
(
gDirUtilp
->
getPerAccountChatLogsDir
());
LLFile
::
mkdir
(
gDirUtilp
->
getPerAccountChatLogsDir
());
//Initialize conversation log only when chat log directories are ready
if
(
!
LLConversationLog
::
instanceExists
())
{
// Check existance since this part can be reached twice if login fails
LLConversationLog
::
initParamSingleton
();
}
//good a place as any to create user windlight directories
//good a place as any to create user windlight directories
std
::
string
user_windlight_path_name
(
gDirUtilp
->
getExpandedFilename
(
LL_PATH_USER_SETTINGS
,
"windlight"
,
""
));
std
::
string
user_windlight_path_name
(
gDirUtilp
->
getExpandedFilename
(
LL_PATH_USER_SETTINGS
,
"windlight"
,
""
));
...
@@ -1298,6 +1292,12 @@ bool idle_startup()
...
@@ -1298,6 +1292,12 @@ bool idle_startup()
LLStartUp
::
initExperiences
();
LLStartUp
::
initExperiences
();
display_startup
();
display_startup
();
// If logging should be enebled, turns it on and loads history from disk
// Note: does not happen on init of singleton because preferences can use
// this instance without logging in
LLConversationLog
::
getInstance
()
->
initLoggingState
();
LLStartUp
::
setStartupState
(
STATE_MULTIMEDIA_INIT
);
LLStartUp
::
setStartupState
(
STATE_MULTIMEDIA_INIT
);
return
FALSE
;
return
FALSE
;
...
...
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