summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llstartup.cpp13
-rw-r--r--indra/newview/llviewermenufile.cpp41
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml20
3 files changed, 64 insertions, 10 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 7fb4764f4f..c5ef985f1b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -244,6 +244,7 @@ static std::string gFirstSimSeedCap;
static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f);
static std::string gAgentStartLocation = "safe";
static bool mLoginStatePastUI = false;
+static bool mBenefitsSuccessfullyInit = false;
const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds
@@ -275,6 +276,7 @@ void general_cert_done(const LLSD& notification, const LLSD& response);
void trust_cert_done(const LLSD& notification, const LLSD& response);
void apply_udp_blacklist(const std::string& csv);
bool process_login_success_response();
+void on_benefits_failed_callback(const LLSD& notification, const LLSD& response);
void transition_back_to_login_panel(const std::string& emsg);
void callback_cache_name(const LLUUID& id, const std::string& full_name, bool is_group)
@@ -2157,6 +2159,11 @@ bool idle_startup()
set_startup_status(1.0, "", "");
display_startup();
+ if (!mBenefitsSuccessfullyInit)
+ {
+ LLNotificationsUtil::add("FailedToGetBenefits", LLSD(), LLSD(), boost::bind(on_benefits_failed_callback, _1, _2));
+ }
+
// Let the map know about the inventory.
LLFloaterWorldMap* floater_world_map = LLFloaterWorldMap::getInstance();
if(floater_world_map)
@@ -3328,11 +3335,7 @@ bool process_login_success_response()
{
LLSD response = LLLoginInstance::getInstance()->getResponse();
- bool benefits_ok = init_benefits(response);
- if (!benefits_ok)
- {
- LLNotificationsUtil::add("FailedToGetBenefits", LLSD(), LLSD(), boost::bind(on_benefits_failed_callback, _1, _2));
- }
+ mBenefitsSuccessfullyInit = init_benefits(response);
std::string text(response["udp_blacklist"]);
if(!text.empty())
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 4ce39e715c..741ce7a182 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -446,15 +446,21 @@ void do_bulk_upload(std::vector<std::string> filenames, const LLSD& notification
}
}
-bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S32& total_cost)
+bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S32& total_cost, S32& file_count, S32& bvh_count)
{
- bool succ = true;
total_cost = 0;
+ file_count = 0;
+ bvh_count = 0;
for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
{
std::string filename = (*in_iter);
std::string ext = gDirUtilp->getExtension(filename);
+ if (ext == "bvh")
+ {
+ bvh_count++;
+ }
+
LLAssetType::EType asset_type;
U32 codec;
S32 cost;
@@ -463,10 +469,11 @@ bool get_bulk_upload_expected_cost(const std::vector<std::string>& filenames, S3
LLAgentBenefitsMgr::current().findUploadCost(asset_type, cost))
{
total_cost += cost;
+ file_count++;
}
}
- return succ;
+ return file_count > 0;
}
const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type)
@@ -491,14 +498,38 @@ const void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::
filtered_filenames.push_back(filename);
}
}
+
S32 expected_upload_cost;
- if (get_bulk_upload_expected_cost(filtered_filenames, expected_upload_cost))
+ S32 expected_upload_count;
+ S32 bvh_count;
+ if (get_bulk_upload_expected_cost(filtered_filenames, expected_upload_cost, expected_upload_count, bvh_count))
{
LLSD args;
args["COST"] = expected_upload_cost;
- args["COUNT"] = (S32) filtered_filenames.size();
+ args["COUNT"] = expected_upload_count;
LLNotificationsUtil::add("BulkUploadCostConfirmation", args, LLSD(), boost::bind(do_bulk_upload, filtered_filenames, _1, _2));
+
+ if (filtered_filenames.size() > expected_upload_count)
+ {
+ if (bvh_count == filtered_filenames.size() - expected_upload_count)
+ {
+ LLNotificationsUtil::add("DoNotSupportBulkAnimationUpload");
+ }
+ else
+ {
+ LLNotificationsUtil::add("BulkUploadIncompatibleFiles");
+ }
+ }
+ }
+ else if (bvh_count == filtered_filenames.size())
+ {
+ LLNotificationsUtil::add("DoNotSupportBulkAnimationUpload");
}
+ else
+ {
+ LLNotificationsUtil::add("BulkUploadNoCompatibleFiles");
+ }
+
}
class LLFileUploadImage : public view_listener_t
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index d6b93cb42e..5557f07dfc 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -8492,6 +8492,26 @@ This will upload [COUNT] items at a total cost of L$[COST]. Do you wish to conti
name="okcancelbuttons"
notext="Cancel"
yestext="Upload"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="BulkUploadNoCompatibleFiles"
+ type="alertmodal">
+Selected files can not be bulk-uploaded.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="BulkUploadIncompatibleFiles"
+ type="alertmodal">
+Some of the selected files can not be bulk-uploaded.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
</notification>
<notification