summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-02-20 15:51:44 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-02-20 15:51:44 -0800
commit10dfe2d53413d2522038e79d4921a2305762dd63 (patch)
tree336fc76b6b719cff6f927fd0cd201ad781b8bbe2 /indra/newview
parentdb0d52bff4c4fb9d4df910b63b5ec8c881edc3be (diff)
CHUI-778: Minor changes, prior commit was not changing the file path correctly due to logic error. Also clicking the 'Cancel' in preferences would still cause the file location to be saved instead of ignore the save.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloaterpreference.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index b3e3a0678b..e5444583d6 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -646,13 +646,6 @@ void LLFloaterPreference::cancel()
LLFloaterPathfindingConsole* pPathfindingConsole = pathfindingConsoleHandle.get();
pPathfindingConsole->onRegionBoundaryCross();
}
-
- if(mInstantMessageLogPathChanged)
- {
- std::string dir_name(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
- updateLogLocation(dir_name);
- mInstantMessageLogPathChanged = false;
- }
}
void LLFloaterPreference::onOpen(const LLSD& key)
@@ -802,6 +795,14 @@ void LLFloaterPreference::onBtnOK()
apply();
closeFloater(false);
+ //Conversation transcript and log path changed so reload conversations based on new location
+ if(mInstantMessageLogPathChanged)
+ {
+ std::string dir_name(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
+ updateLogLocation(dir_name);
+ mInstantMessageLogPathChanged = false;
+ }
+
LLUIColorTable::instance().saveUserSettings();
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
}
@@ -1440,8 +1441,7 @@ void LLFloaterPreference::setAllIgnored()
void LLFloaterPreference::onClickLogPath()
{
- std::string original_name(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
- std::string proposed_name(original_name);
+ std::string proposed_name(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
mInstantMessageLogPathChanged = false;
LLDirPicker& picker = LLDirPicker::instance();
@@ -1451,10 +1451,12 @@ void LLFloaterPreference::onClickLogPath()
return; //Canceled!
}
+ //Gets the path from the directory picker
+ std::string dir_name = picker.getDirName();
+
//Path changed
- if(original_name != proposed_name)
+ if(proposed_name != dir_name)
{
- std::string dir_name = picker.getDirName();
gSavedPerAccountSettings.setString("InstantMessageLogPath", dir_name);
mInstantMessageLogPathChanged = true;