summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenufile.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenufile.h')
-rw-r--r--indra/newview/llviewermenufile.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index 6941b4dc0e..15bbdd1e2d 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -81,21 +81,48 @@ public:
static void cleanupClass();
static void clearDead();
- std::string mFile;
+ std::vector<std::string> mResponses;
+ std::string mProposedName;
- LLFilePicker::ELoadFilter mFilter;
+ LLFilePicker::ELoadFilter mLoadFilter;
+ LLFilePicker::ESaveFilter mSaveFilter;
+ bool mIsSaveDialog;
+ bool mIsGetMultiple;
- LLFilePickerThread(LLFilePicker::ELoadFilter filter)
- : LLThread("file picker"), mFilter(filter)
+ LLFilePickerThread(LLFilePicker::ELoadFilter filter, bool get_multiple = false)
+ : LLThread("file picker"), mLoadFilter(filter), mIsSaveDialog(false), mIsGetMultiple(get_multiple)
{
+ }
+ LLFilePickerThread(LLFilePicker::ESaveFilter filter, const std::string &proposed_name)
+ : LLThread("file picker"), mSaveFilter(filter), mIsSaveDialog(true), mProposedName(proposed_name)
+ {
}
void getFile();
virtual void run();
- virtual void notify(const std::string& filename) = 0;
+ virtual void notify(const std::vector<std::string>& filenames) = 0;
+};
+
+
+class LLFilePickerReplyThread : public LLFilePickerThread
+{
+public:
+
+ typedef boost::signals2::signal<void(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter load_filter, LLFilePicker::ESaveFilter save_filter)> file_picked_signal_t;
+
+ LLFilePickerReplyThread(const file_picked_signal_t::slot_type& cb, LLFilePicker::ELoadFilter filter, bool get_multiple);
+ LLFilePickerReplyThread(const file_picked_signal_t::slot_type& cb, LLFilePicker::ESaveFilter filter, const std::string &proposed_name);
+ ~LLFilePickerReplyThread();
+
+ virtual void notify(const std::vector<std::string>& filenames);
+
+private:
+ LLFilePicker::ELoadFilter mLoadFilter;
+ LLFilePicker::ESaveFilter mSaveFilter;
+ file_picked_signal_t* mFilePickedSignal;
};