diff options
| author | maxim_productengine <mnikolenko@productengine.com> | 2018-05-30 18:31:30 +0300 |
|---|---|---|
| committer | maxim_productengine <mnikolenko@productengine.com> | 2018-05-30 18:31:30 +0300 |
| commit | 31bfc7ff47c95a9fc9c23ed101a07c071d07daaa (patch) | |
| tree | 7f0c90f10238f38c1046e620bd4a1387f3711e3e /indra/newview/llfloaterspellchecksettings.cpp | |
| parent | 177f24f56fd6a3624efa1fa311c5a79025fbfa64 (diff) | |
MAINT-8700 FIXED The File dialog disconnects the viewer if you do not choose upload files within the first minute
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); |
