diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-21 15:49:53 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-21 15:49:53 +0100 |
commit | 9d7b353cbb5c12cd74559a8f3a7365312f95d4d0 (patch) | |
tree | b35c3e3eb0c9c93cea2c01248a3943d5c1277fa7 /indra/newview/llfloaterspellchecksettings.cpp | |
parent | 8abfd8da4fb222382437f4b547567fabc6f75cf8 (diff) | |
parent | dc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff) |
merge
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); |