summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-06-26 09:45:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-06-26 09:45:14 -0400
commitf4a772b2b8e70eb3ef3b734a7d3e1623e3f1be15 (patch)
treecc1759aeb34319f3af32085a7fc778fca7eda92d /indra/newview/llfloaterpreference.cpp
parent020757ff0170aa894c56cd719d46413c9e99fde6 (diff)
parent9db683c13e67575bd347cf8a795f1a4ee148c4ea (diff)
DRTVWR-453: Update from MAINT (viewer-lynx).
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp39
1 files changed, 17 insertions, 22 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 9d723bdd9d..4ce35643b1 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1096,16 +1096,15 @@ void LLFloaterPreference::onClickSetCache()
std::string proposed_name(cur_name);
- LLDirPicker& picker = LLDirPicker::instance();
- if (! picker.getDir(&proposed_name ) )
- {
- return; //Canceled!
- }
+ (new LLDirPickerThread(boost::bind(&LLFloaterPreference::changeCachePath, this, _1, _2), proposed_name))->getFile();
+}
- std::string dir_name = picker.getDirName();
- if (!dir_name.empty() && dir_name != cur_name)
+void LLFloaterPreference::changeCachePath(const std::vector<std::string>& filenames, std::string proposed_name)
+{
+ std::string dir_name = filenames[0];
+ if (!dir_name.empty() && dir_name != proposed_name)
{
- std::string new_top_folder(gDirUtilp->getBaseFileName(dir_name));
+ std::string new_top_folder(gDirUtilp->getBaseFileName(dir_name));
LLNotificationsUtil::add("CacheWillBeMoved");
gSavedSettings.setString("NewCacheLocation", dir_name);
gSavedSettings.setString("NewCacheLocationTopFolder", new_top_folder);
@@ -1744,25 +1743,21 @@ void LLFloaterPreference::onClickLogPath()
std::string proposed_name(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
mPriorInstantMessageLogPath.clear();
- LLDirPicker& picker = LLDirPicker::instance();
- //Launches a directory picker and waits for feedback
- if (!picker.getDir(&proposed_name ) )
- {
- return; //Canceled!
- }
- //Gets the path from the directory picker
- std::string dir_name = picker.getDirName();
+ (new LLDirPickerThread(boost::bind(&LLFloaterPreference::changeLogPath, this, _1, _2), proposed_name))->getFile();
+}
+void LLFloaterPreference::changeLogPath(const std::vector<std::string>& filenames, std::string proposed_name)
+{
//Path changed
- if(proposed_name != dir_name)
+ if (proposed_name != filenames[0])
{
- gSavedPerAccountSettings.setString("InstantMessageLogPath", dir_name);
+ gSavedPerAccountSettings.setString("InstantMessageLogPath", filenames[0]);
mPriorInstantMessageLogPath = proposed_name;
-
- // enable/disable 'Delete transcripts button
- updateDeleteTranscriptsButton();
-}
+
+ // enable/disable 'Delete transcripts button
+ updateDeleteTranscriptsButton();
+ }
}
bool LLFloaterPreference::moveTranscriptsAndLog()