summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterspellchecksettings.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-06-22 11:08:36 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-06-22 11:08:36 +0300
commit21f19cb6f036787d93b186d6fcfd595ae6f03d87 (patch)
treeaa09de906e9c2f9c30670e81498f93620c67d9b8 /indra/newview/llfloaterspellchecksettings.cpp
parentb0e5bee0b41e050e14d4e315ffa967ba43f96feb (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llfloaterspellchecksettings.cpp')
-rw-r--r--indra/newview/llfloaterspellchecksettings.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp
index 5124dae147..b87044ef5a 100644
--- a/indra/newview/llfloaterspellchecksettings.cpp
+++ b/indra/newview/llfloaterspellchecksettings.cpp
@@ -30,12 +30,13 @@
#include "llfilepicker.h"
#include "llfloaterreg.h"
#include "llfloaterspellchecksettings.h"
+#include "llnotificationsutil.h"
#include "llscrolllistctrl.h"
#include "llsdserialize.h"
#include "llspellcheck.h"
#include "lltrans.h"
#include "llviewercontrol.h"
-#include "llnotificationsutil.h"
+#include "llviewermenufile.h" // LLFilePickerReplyThread
#include <boost/algorithm/string.hpp>
@@ -258,13 +259,12 @@ BOOL LLFloaterSpellCheckerImport::postBuild(void)
void LLFloaterSpellCheckerImport::onBtnBrowse()
{
- LLFilePicker& file_picker = LLFilePicker::instance();
- if (!file_picker.getOpenFile(LLFilePicker::FFLOAD_DICTIONARY))
- {
- return;
- }
+ (new LLFilePickerReplyThread(boost::bind(&LLFloaterSpellCheckerImport::importSelectedDictionary, this, _1), LLFilePicker::FFLOAD_DICTIONARY, false))->getFile();
+}
- std::string filepath = file_picker.getFirstFile();
+void LLFloaterSpellCheckerImport::importSelectedDictionary(const std::vector<std::string>& filenames)
+{
+ std::string filepath = filenames[0];
const std::string extension = gDirUtilp->getExtension(filepath);
if ("xcu" == extension)
@@ -277,7 +277,7 @@ void LLFloaterSpellCheckerImport::onBtnBrowse()
}
getChild<LLUICtrl>("dictionary_path")->setValue(filepath);
-
+
mDictionaryDir = gDirUtilp->getDirName(filepath);
mDictionaryBasename = gDirUtilp->getBaseFileName(filepath, true);
getChild<LLUICtrl>("dictionary_name")->setValue(mDictionaryBasename);