diff options
author | Oz Linden <oz@lindenlab.com> | 2018-06-21 15:31:21 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2018-06-21 15:31:21 -0400 |
commit | 3cdce9bf24ebac1c48b30955910a8f6b36797cb5 (patch) | |
tree | 5f731c4237dfe544e475c7d5f119aa2c6e8edcb8 /indra/newview/llfloaterspellchecksettings.cpp | |
parent | c0e00cc61750d2b1bba3ada6622023df4725b1a4 (diff) | |
parent | dc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff) |
merge changes for 5.1.6-release
Diffstat (limited to 'indra/newview/llfloaterspellchecksettings.cpp')
-rw-r--r-- | indra/newview/llfloaterspellchecksettings.cpp | 16 |
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); |