Group Feature Request/Bug Fix: Allow setting a log location for any account before log in
The new setting gets overridden by the per account setting, if it has been set, but provides users the ability to set log location pre-login.
This commit is contained in:
@@ -726,6 +726,17 @@ Found in Advanced->Rendering->Info Displays</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>InstantMessageLogPathAnyAccount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Path to your log files if you've never set the path while logged in on this account.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string/>
|
||||
</map>
|
||||
<key>UseConciseIMButtons</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -113,7 +113,7 @@ BOOL LLPrefsIMImpl::postBuild()
|
||||
childDisable("log_instant_messages");
|
||||
childDisable("log_chat");
|
||||
childDisable("log_show_history");
|
||||
childDisable("log_path_button");
|
||||
//childDisable("log_path_button");
|
||||
childDisable("busy_response");
|
||||
childDisable("log_instant_messages_timestamp");
|
||||
childDisable("log_chat_timestamp");
|
||||
@@ -127,7 +127,8 @@ BOOL LLPrefsIMImpl::postBuild()
|
||||
childSetValue("show_timestamps_check", gSavedSettings.getBOOL("IMShowTimestamps"));
|
||||
childSetValue("friends_online_notify_checkbox", gSavedSettings.getBOOL("ChatOnlineNotification"));
|
||||
|
||||
childSetText("log_path_string", gSavedPerAccountSettings.getString("InstantMessageLogPath"));
|
||||
const std::string log_path = gSavedPerAccountSettings.getString("InstantMessageLogPath");
|
||||
childSetText("log_path_string", log_path.empty() ? gSavedSettings.getString("InstantMessageLogPathAnyAccount") : log_path);
|
||||
childSetValue("log_instant_messages", gSavedPerAccountSettings.getBOOL("LogInstantMessages"));
|
||||
childSetValue("log_chat", gSavedPerAccountSettings.getBOOL("LogChat"));
|
||||
childSetValue("log_show_history", gSavedPerAccountSettings.getBOOL("LogShowHistory"));
|
||||
@@ -229,6 +230,12 @@ void LLPrefsIMImpl::apply()
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const std::string log_path = childGetText("log_path_string");
|
||||
gSavedPerAccountSettings.setString("InstantMessageLogPathAnyAccount", log_path);
|
||||
gDirUtilp->setChatLogsDir(log_path);
|
||||
}
|
||||
}
|
||||
|
||||
void LLPrefsIMImpl::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email)
|
||||
|
||||
@@ -1048,7 +1048,8 @@ bool idle_startup()
|
||||
//Default the path if one isn't set.
|
||||
if (gSavedPerAccountSettings.getString("InstantMessageLogPath").empty())
|
||||
{
|
||||
gDirUtilp->setChatLogsDir(gDirUtilp->getOSUserAppDir());
|
||||
const std::string dir = gSavedSettings.getString("InstantMessageLogPathAnyAccount");
|
||||
gDirUtilp->setChatLogsDir(dir.empty() ? gDirUtilp->getOSUserAppDir() : dir);
|
||||
gSavedPerAccountSettings.setString("InstantMessageLogPath",gDirUtilp->getChatLogsDir());
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user