diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2018-06-18 17:49:49 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2018-06-18 17:49:49 +0300 |
commit | bbc49ea0b6fba760954f0ed8cc89434ef83afcc5 (patch) | |
tree | 641c2461e00e021aed966293d41bd6eba5c65c04 /indra/newview/lldirpicker.h | |
parent | dc580b3a0af5528329052f014a80365e3c34c353 (diff) |
MAINT-8759 FIXED [Win] Choosing new cache location will cause disconnect if you do not choose desired path in File picker quickly
Diffstat (limited to 'indra/newview/lldirpicker.h')
-rw-r--r-- | indra/newview/lldirpicker.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/indra/newview/lldirpicker.h b/indra/newview/lldirpicker.h index 8656b23afd..c1087c70ac 100644 --- a/indra/newview/lldirpicker.h +++ b/indra/newview/lldirpicker.h @@ -33,6 +33,13 @@ #include "stdtypes.h" +#include "llthread.h" +#include <queue> + +#if LL_WINDOWS +#include <shlobj.h> +#endif + #if LL_DARWIN // AssertMacros.h does bad things. @@ -53,7 +60,7 @@ public: // calling this before main() is undefined static LLDirPicker& instance( void ) { return sInstance; } - BOOL getDir(std::string* filename); + BOOL getDir(std::string filename, bool blocking = true); std::string getDirName(); // clear any lists of buffers or whatever, and make sure the dir @@ -76,11 +83,15 @@ private: LLFilePicker *mFilePicker; #endif + std::string* mFileName; std::string mDir; bool mLocked; static LLDirPicker sInstance; +#if LL_WINDOWS + BROWSEINFO bi; +#endif public: // don't call these directly please. @@ -88,4 +99,33 @@ public: ~LLDirPicker(); }; +class LLDirPickerThread : public LLThread +{ +public: + + static std::queue<LLDirPickerThread*> sDeadQ; + static LLMutex* sMutex; + + static void initClass(); + static void cleanupClass(); + static void clearDead(); + + std::vector<std::string> mResponses; + std::string mProposedName; + + typedef boost::signals2::signal<void(const std::vector<std::string>& filenames, std::string proposed_name)> dir_picked_signal_t; + + LLDirPickerThread(const dir_picked_signal_t::slot_type& cb, const std::string &proposed_name); + ~LLDirPickerThread(); + + void getFile(); + + virtual void run(); + + virtual void notify(const std::vector<std::string>& filenames); + +private: + dir_picked_signal_t* mFilePickedSignal; +}; + #endif |