summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenufile.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-05-07 10:56:41 -0700
committersimon <none@none>2014-05-07 10:56:41 -0700
commit250db74bf9325acdc1169f6c13d297e7fe44b753 (patch)
treec6926efeefeb10ec3a36b296aa1ac7bd8521e0e3 /indra/newview/llviewermenufile.cpp
parent676bad148a72c235ec79742e3f490ca66b4f40d0 (diff)
parentd0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff)
Pull and merge viewer-release as version 3.7.8
Diffstat (limited to 'indra/newview/llviewermenufile.cpp')
-rwxr-xr-xindra/newview/llviewermenufile.cpp75
1 files changed, 36 insertions, 39 deletions
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 4c95dcd6a2..04697f3472 100755
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -253,7 +253,7 @@ const std::string upload_pick(void* data)
LLFilePicker& picker = LLFilePicker::instance();
if (!picker.getOpenFile(type))
{
- llinfos << "Couldn't import objects from file" << llendl;
+ LL_INFOS() << "Couldn't import objects from file" << LL_ENDL;
return std::string();
}
@@ -327,7 +327,7 @@ const std::string upload_pick(void* data)
std::string error_msg;
if (check_for_invalid_wav_formats(filename,error_msg))
{
- llinfos << error_msg << ": " << filename << llendl;
+ LL_INFOS() << error_msg << ": " << filename << LL_ENDL;
LLSD args;
args["FILE"] = filename;
LLNotificationsUtil::add( error_msg, args );
@@ -455,7 +455,7 @@ class LLFileUploadBulk : public view_listener_t
}
else
{
- llinfos << "Couldn't import objects from file" << llendl;
+ LL_INFOS() << "Couldn't import objects from file" << LL_ENDL;
}
return true;
}
@@ -463,11 +463,11 @@ class LLFileUploadBulk : public view_listener_t
void upload_error(const std::string& error_message, const std::string& label, const std::string& filename, const LLSD& args)
{
- llwarns << error_message << llendl;
+ LL_WARNS() << error_message << LL_ENDL;
LLNotificationsUtil::add(label, args);
if(LLFile::remove(filename) == -1)
{
- lldebugs << "unable to remove temp file" << llendl;
+ LL_DEBUGS() << "unable to remove temp file" << LL_ENDL;
}
LLFilePicker::instance().reset();
}
@@ -544,7 +544,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
formatted = new LLImageJPEG(gSavedSettings.getS32("SnapshotQuality"));
break;
default:
- llwarns << "Unknown local snapshot format: " << fmt << llendl;
+ LL_WARNS() << "Unknown local snapshot format: " << fmt << LL_ENDL;
case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG:
formatted = new LLImagePNG;
break;
@@ -581,8 +581,8 @@ void handle_compress_image(void*)
{
std::string outfile = infile + ".j2c";
- llinfos << "Input: " << infile << llendl;
- llinfos << "Output: " << outfile << llendl;
+ LL_INFOS() << "Input: " << infile << LL_ENDL;
+ LL_INFOS() << "Output: " << outfile << LL_ENDL;
BOOL success;
@@ -590,11 +590,11 @@ void handle_compress_image(void*)
if (success)
{
- llinfos << "Compression complete" << llendl;
+ LL_INFOS() << "Compression complete" << LL_ENDL;
}
else
{
- llinfos << "Compression failed: " << LLImage::getLastError() << llendl;
+ LL_INFOS() << "Compression failed: " << LLImage::getLastError() << LL_ENDL;
}
infile = picker.getNextFile();
@@ -662,7 +662,7 @@ LLUUID upload_new_resource(
asset_type = LLAssetType::AT_SOUND; // tag it as audio
S32 encode_result = 0;
- llinfos << "Attempting to encode wav as an ogg file" << llendl;
+ LL_INFOS() << "Attempting to encode wav as an ogg file" << LL_ENDL;
encode_result = encode_vorbis_file(src_filename, filename);
@@ -713,8 +713,8 @@ LLUUID upload_new_resource(
"%254s %254s\n",
label, value);
- llinfos << "got: " << label << " = " << value
- << llendl;
+ LL_INFOS() << "got: " << label << " = " << value
+ << LL_ENDL;
if (EOF == tokens_read)
{
@@ -767,7 +767,7 @@ LLUUID upload_new_resource(
// read in and throw out most of the header except for the type
if (fread(buf, header_size, 1, in) != 1)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS() << "Short read" << LL_ENDL;
}
memcpy(&type_num, buf + 16, sizeof(S16)); /* Flawfinder: ignore */
asset_type = (LLAssetType::EType)type_num;
@@ -781,7 +781,7 @@ LLUUID upload_new_resource(
{
if (fwrite(buf, 1, readbytes, out) != readbytes)
{
- llwarns << "Short write" << llendl;
+ LL_WARNS() << "Short write" << LL_ENDL;
}
}
fclose(out);
@@ -799,7 +799,7 @@ LLUUID upload_new_resource(
}
else
{
- llinfos << "Couldn't open .lin file " << src_filename << llendl;
+ LL_INFOS() << "Couldn't open .lin file " << src_filename << LL_ENDL;
}
}
else if (exten == "bvh")
@@ -875,13 +875,13 @@ LLUUID upload_new_resource(
}
else
{
- llwarns << error_message << llendl;
+ LL_WARNS() << error_message << LL_ENDL;
LLSD args;
args["ERROR_MESSAGE"] = error_message;
LLNotificationsUtil::add("ErrorMessage", args);
if(LLFile::remove(filename) == -1)
{
- lldebugs << "unable to remove temp file" << llendl;
+ LL_DEBUGS() << "unable to remove temp file" << LL_ENDL;
}
LLFilePicker::instance().reset();
}
@@ -949,7 +949,7 @@ void upload_done_callback(
if(is_balance_sufficient)
{
// Actually add the upload to inventory
- llinfos << "Adding " << uuid << " to inventory." << llendl;
+ LL_INFOS() << "Adding " << uuid << " to inventory." << LL_ENDL;
const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc);
if(folder_id.notNull())
{
@@ -966,7 +966,7 @@ void upload_done_callback(
}
else
{
- llwarns << "Can't find a folder to put it in" << llendl;
+ LL_WARNS() << "Can't find a folder to put it in" << LL_ENDL;
}
}
}
@@ -1098,17 +1098,17 @@ void upload_new_resource(
if( LLAssetType::AT_SOUND == asset_type )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_SOUND_COUNT );
+ add(LLStatViewer::UPLOAD_SOUND, 1);
}
else
if( LLAssetType::AT_TEXTURE == asset_type )
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_TEXTURE_COUNT );
+ add(LLStatViewer::UPLOAD_TEXTURE, 1);
}
else
if( LLAssetType::AT_ANIMATION == asset_type)
{
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_UPLOAD_ANIM_COUNT );
+ add(LLStatViewer::ANIMATION_UPLOADS, 1);
}
if(LLInventoryType::IT_NONE == inv_type)
@@ -1131,21 +1131,21 @@ void upload_new_resource(
upload_message.append(display_name);
LLUploadDialog::modalUploadDialog(upload_message);
- llinfos << "*** Uploading: " << llendl;
- llinfos << "Type: " << LLAssetType::lookup(asset_type) << llendl;
- llinfos << "UUID: " << uuid << llendl;
- llinfos << "Name: " << name << llendl;
- llinfos << "Desc: " << desc << llendl;
- llinfos << "Expected Upload Cost: " << expected_upload_cost << llendl;
- lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl;
- lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl;
+ LL_INFOS() << "*** Uploading: " << LL_ENDL;
+ LL_INFOS() << "Type: " << LLAssetType::lookup(asset_type) << LL_ENDL;
+ LL_INFOS() << "UUID: " << uuid << LL_ENDL;
+ LL_INFOS() << "Name: " << name << LL_ENDL;
+ LL_INFOS() << "Desc: " << desc << LL_ENDL;
+ LL_INFOS() << "Expected Upload Cost: " << expected_upload_cost << LL_ENDL;
+ LL_DEBUGS() << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << LL_ENDL;
+ LL_DEBUGS() << "Asset Type: " << LLAssetType::lookup(asset_type) << LL_ENDL;
std::string url = gAgent.getRegion()->getCapability(
"NewFileAgentInventory");
if ( !url.empty() )
{
- llinfos << "New Agent Inventory via capability" << llendl;
+ LL_INFOS() << "New Agent Inventory via capability" << LL_ENDL;
LLSD body;
body = generate_new_resource_upload_capability_body(
@@ -1168,7 +1168,7 @@ void upload_new_resource(
}
else
{
- llinfos << "NewAgentInventory capability not found, new agent inventory via asset system." << llendl;
+ LL_INFOS() << "NewAgentInventory capability not found, new agent inventory via asset system." << LL_ENDL;
// check for adequate funds
// TODO: do this check on the sim
if (LLAssetType::AT_SOUND == asset_type ||
@@ -1233,18 +1233,15 @@ void increase_new_upload_stats(LLAssetType::EType asset_type)
{
if ( LLAssetType::AT_SOUND == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_SOUND_COUNT );
+ add(LLStatViewer::UPLOAD_SOUND, 1);
}
else if ( LLAssetType::AT_TEXTURE == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_TEXTURE_COUNT );
+ add(LLStatViewer::UPLOAD_TEXTURE, 1);
}
else if ( LLAssetType::AT_ANIMATION == asset_type )
{
- LLViewerStats::getInstance()->incStat(
- LLViewerStats::ST_UPLOAD_ANIM_COUNT );
+ add(LLStatViewer::ANIMATION_UPLOADS, 1);
}
}