summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorcallum_linden <callum@lindenlab.com>2017-12-14 14:27:49 -0800
committercallum_linden <callum@lindenlab.com>2017-12-14 14:27:49 -0800
commit6166ab28dd43304085b23c0d35698be9d90bb8a9 (patch)
tree42731c3c98ad2efc6e4211491b05a86855e2b05c /indra/newview
parent0b97c76dbb238fab079d10433ecf37045f6134ae (diff)
Pull in Dullahan 1.1.929 (multiple file picking support) and update plugin code accordingly
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermedia.cpp34
1 files changed, 26 insertions, 8 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 114f1d327b..9dd8b00ef6 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3480,22 +3480,40 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
case LLViewerMediaObserver::MEDIA_EVENT_PICK_FILE_REQUEST:
{
- // Display a file picker
- std::string response;
-
LLFilePicker& picker = LLFilePicker::instance();
- if (!picker.getOpenFile(LLFilePicker::FFLOAD_ALL))
+ std::vector<std::string> responses;
+
+ bool pick_multiple_files = plugin->getIsMultipleFilePick();
+ if (pick_multiple_files == false)
{
- // The user didn't pick a file -- the empty response string will indicate this.
+ picker.getOpenFile(LLFilePicker::FFLOAD_ALL);
+
+ std::string filename = picker.getFirstFile();
+ responses.push_back(filename);
}
+ else
+ {
+ if (picker.getMultipleOpenFiles())
+ {
+ std::string filename = picker.getFirstFile();
- response = picker.getFirstFile();
+ responses.push_back(filename);
- plugin->sendPickFileResponse(response);
+ while (!filename.empty())
+ {
+ filename = picker.getNextFile();
+
+ if (!filename.empty())
+ {
+ responses.push_back(filename);
+ }
+ }
+ }
+ }
+ plugin->sendPickFileResponse(responses);
}
break;
-
case LLViewerMediaObserver::MEDIA_EVENT_AUTH_REQUEST:
{
LLNotification::Params auth_request_params;