diff options
| author | Callum Prentice <callum@lindenlab.com> | 2025-08-22 17:12:03 -0700 | 
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2025-08-22 17:12:03 -0700 | 
| commit | e935a8aebca4ae014b5f6b438612ac5674678fe6 (patch) | |
| tree | 531498d040a62c01d444fe91eb99afb091c7fff4 /indra/newview/llviewermenufile.cpp | |
| parent | bebd1b208e1b342fabf59844851124a91513e83b (diff) | |
| parent | cefee59b0e5fff683a50fe61633a9c14493d7145 (diff) | |
Merge branch 'develop' into callum/viewer-cef-2025-08
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
| -rw-r--r-- | indra/newview/llviewermenufile.cpp | 33 | 
1 files changed, 20 insertions, 13 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 990296c11e..3695478061 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -479,13 +479,19 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad      return true;  } -const void upload_single_file(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type) +void upload_single_file( +    const std::vector<std::string>& filenames, +    LLFilePicker::ELoadFilter type, +    const LLUUID& dest)  {      std::string filename = filenames[0];      if (!check_file_extension(filename, type)) return;      if (!filename.empty())      { +        LLSD args; +        args["filename"] = filename; +        args["dest"] = dest;          if (type == LLFilePicker::FFLOAD_WAV)          {              // pre-qualify wavs to make sure the format is acceptable @@ -500,12 +506,12 @@ const void upload_single_file(const std::vector<std::string>& filenames, LLFileP              }              else              { -                LLFloaterReg::showInstance("upload_sound", LLSD(filename)); +                LLFloaterReg::showInstance("upload_sound", args);              }          }          if (type == LLFilePicker::FFLOAD_IMAGE)          { -            LLFloaterReg::showInstance("upload_image", LLSD(filename)); +            LLFloaterReg::showInstance("upload_image", args);          }          if (type == LLFilePicker::FFLOAD_ANIM)          { @@ -513,11 +519,11 @@ const void upload_single_file(const std::vector<std::string>& filenames, LLFileP              LLStringUtil::toLower(filename_lc);              if (filename_lc.rfind(".anim") != std::string::npos)              { -                LLFloaterReg::showInstance("upload_anim_anim", LLSD(filename)); +                LLFloaterReg::showInstance("upload_anim_anim", args);              }              else              { -                LLFloaterReg::showInstance("upload_anim_bvh", LLSD(filename)); +                LLFloaterReg::showInstance("upload_anim_bvh", args);              }          }      } @@ -818,7 +824,7 @@ bool get_bulk_upload_expected_cost(      return file_count > 0;  } -const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool allow_2k) +void upload_bulk(const std::vector<std::string>& filtered_filenames, bool allow_2k, const LLUUID& dest)  {      S32 expected_upload_cost;      S32 expected_upload_count; @@ -830,6 +836,7 @@ const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool          key["upload_cost"] = expected_upload_cost;          key["upload_count"] = expected_upload_count;          key["has_2k_textures"] = (textures_2k_count > 0); +        key["dest"] = dest;          LLSD array;          for (const std::string& str : filtered_filenames) @@ -863,7 +870,7 @@ const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool  } -const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k) +void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k, const LLUUID& dest)  {      // TODO:      // Check user balance for entire cost @@ -885,7 +892,7 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::              filtered_filenames.push_back(filename);          }      } -    upload_bulk(filtered_filenames, allow_2k); +    upload_bulk(filtered_filenames, allow_2k, dest);  }  class LLFileUploadImage : public view_listener_t @@ -896,7 +903,7 @@ class LLFileUploadImage : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_IMAGE, false); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, LLUUID::null), LLFilePicker::FFLOAD_IMAGE, false);          return true;      }  }; @@ -927,7 +934,7 @@ class LLFileUploadSound : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_WAV, false); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, LLUUID::null), LLFilePicker::FFLOAD_WAV, false);          return true;      }  }; @@ -940,7 +947,7 @@ class LLFileUploadAnim : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2), LLFilePicker::FFLOAD_ANIM, false); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_single_file, _1, _2, LLUUID::null), LLFilePicker::FFLOAD_ANIM, false);          return true;      }  }; @@ -953,7 +960,7 @@ class LLFileUploadBulk : public view_listener_t          {              gAgentCamera.changeCameraToDefault();          } -        LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true), LLFilePicker::FFLOAD_ALL, true); +        LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true, LLUUID::null), LLFilePicker::FFLOAD_ALL, true);          return true;      }  }; @@ -1243,7 +1250,7 @@ LLUUID upload_new_resource(          name, desc, compression_info,          destination_folder_type, inv_type,          next_owner_perms, group_perms, everyone_perms, -        expected_upload_cost, show_inventory)); +        expected_upload_cost, LLUUID::null, show_inventory));      upload_new_resource(uploadInfo, callback, userdata);      return LLUUID::null;  | 
