MAINT-5966 - file download failures need feedback
parent
3e46058651
commit
3bf8929d93
|
|
@ -1536,11 +1536,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>4672806a0dfc8a07bb808baa1811730a</string>
|
||||
<string>5a0f74f8e736d91d2c2c6cbc71db90bd</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/309128/arch/Darwin/installer/llceflib-1.5.0.309128-darwin-309128.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/309177/arch/Darwin/installer/llceflib-1.5.1.309177-darwin-309177.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
|
|
@ -1550,18 +1550,18 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>5a1ed7307db45125807eb16b2f4e8130</string>
|
||||
<string>5ed007e503cd768681ba282fd6d7aa76</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/309128/arch/CYGWIN/installer/llceflib-1.5.0.309128-windows-309128.tar.bz2</string>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/309177/arch/CYGWIN/installer/llceflib-1.5.1.309177-windows-309177.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>1.5.0.309128</string>
|
||||
<string>1.5.1.309177</string>
|
||||
</map>
|
||||
<key>llphysicsextensions_source</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1090,6 +1090,11 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
|
|||
mAuthRealm = message.getValue("realm");
|
||||
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_AUTH_REQUEST);
|
||||
}
|
||||
else if (message_name == "file_download")
|
||||
{
|
||||
mFileDownloadFilename = message.getValue("filename");
|
||||
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_FILE_DOWNLOAD);
|
||||
}
|
||||
else if(message_name == "debug_message")
|
||||
{
|
||||
mDebugMessageText = message.getValue("message_text");
|
||||
|
|
|
|||
|
|
@ -279,6 +279,10 @@ public:
|
|||
std::string getHoverText() const { return mHoverText; };
|
||||
std::string getHoverLink() const { return mHoverLink; };
|
||||
|
||||
// these are valid during MEDIA_EVENT_LINK_HOVERED
|
||||
std::string getFileDownloadFilename() const { return mFileDownloadFilename; }
|
||||
|
||||
|
||||
const std::string& getMediaName() const { return mMediaName; };
|
||||
std::string getMediaDescription() const { return mMediaDescription; };
|
||||
|
||||
|
|
@ -426,6 +430,7 @@ protected:
|
|||
std::string mAuthRealm;
|
||||
std::string mHoverText;
|
||||
std::string mHoverLink;
|
||||
std::string mFileDownloadFilename;
|
||||
|
||||
/////////////////////////////////////////
|
||||
// media_time class
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ public:
|
|||
|
||||
MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog
|
||||
|
||||
MEDIA_EVENT_FILE_DOWNLOAD, // the plugin wants to download a file
|
||||
|
||||
MEDIA_EVENT_DEBUG_MESSAGE, // plugin sending back debug information for host to process
|
||||
|
||||
MEDIA_EVENT_LINK_HOVERED // Got a "link hovered" event from the plugin
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ private:
|
|||
void onNavigateURLCallback(std::string url, std::string target);
|
||||
bool onHTTPAuthCallback(const std::string host, const std::string realm, std::string& username, std::string& password);
|
||||
void onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle);
|
||||
void onFileDownloadCallback(std::string filename);
|
||||
|
||||
void postDebugMessage(const std::string& msg);
|
||||
void authResponse(LLPluginMessage &message);
|
||||
|
|
@ -292,6 +293,18 @@ bool MediaPluginCEF::onHTTPAuthCallback(const std::string host, const std::strin
|
|||
return mAuthOK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void MediaPluginCEF::onFileDownloadCallback(const std::string filename)
|
||||
{
|
||||
mAuthOK = false;
|
||||
|
||||
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "file_download");
|
||||
message.setValue("filename", filename);
|
||||
|
||||
sendMessage(message);
|
||||
}
|
||||
|
||||
void MediaPluginCEF::onCursorChangedCallback(LLCEFLib::ECursorType type, unsigned int handle)
|
||||
{
|
||||
std::string name = "";
|
||||
|
|
@ -425,6 +438,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
|
|||
mLLCEFLib->setOnAddressChangeCallback(boost::bind(&MediaPluginCEF::onAddressChangeCallback, this, _1));
|
||||
mLLCEFLib->setOnNavigateURLCallback(boost::bind(&MediaPluginCEF::onNavigateURLCallback, this, _1, _2));
|
||||
mLLCEFLib->setOnHTTPAuthCallback(boost::bind(&MediaPluginCEF::onHTTPAuthCallback, this, _1, _2, _3, _4));
|
||||
mLLCEFLib->setOnFileDownloadCallback(boost::bind(&MediaPluginCEF::onFileDownloadCallback, this, _1));
|
||||
mLLCEFLib->setOnCursorChangedCallback(boost::bind(&MediaPluginCEF::onCursorChangedCallback, this, _1, _2));
|
||||
mLLCEFLib->setOnRequestExitCallback(boost::bind(&MediaPluginCEF::onRequestExitCallback, this));
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
#include "llbutton.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llfloaterwebcontent.h"
|
||||
#include "llwindowshade.h"
|
||||
|
|
@ -1093,6 +1094,13 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
|
|||
};
|
||||
break;
|
||||
|
||||
case MEDIA_EVENT_FILE_DOWNLOAD:
|
||||
{
|
||||
//llinfos << "Media event - file download requested - filename is " << self->getFileDownloadFilename() << llendl;
|
||||
//LLNotificationsUtil::add("MediaFileDownloadUnsupported");
|
||||
};
|
||||
break;
|
||||
|
||||
case MEDIA_EVENT_DEBUG_MESSAGE:
|
||||
{
|
||||
LL_INFOS("media") << self->getDebugMessageText() << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -3300,6 +3300,13 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
|
|||
}
|
||||
break;
|
||||
|
||||
case LLViewerMediaObserver::MEDIA_EVENT_FILE_DOWNLOAD:
|
||||
{
|
||||
//llinfos << "Media event - file download requested - filename is " << self->getFileDownloadFilename() << llendl;
|
||||
LLNotificationsUtil::add("MediaFileDownloadUnsupported");
|
||||
}
|
||||
break;
|
||||
|
||||
case LLViewerMediaObserver::MEDIA_EVENT_NAVIGATE_BEGIN:
|
||||
{
|
||||
LL_DEBUGS("Media") << "MEDIA_EVENT_NAVIGATE_BEGIN, uri is: " << plugin->getNavigateURI() << LL_ENDL;
|
||||
|
|
|
|||
|
|
@ -1592,10 +1592,23 @@ The object may be out of range or may have been deleted.
|
|||
icon="alertmodal.tga"
|
||||
name="CannotDownloadFile"
|
||||
type="alertmodal">
|
||||
Unable to download file
|
||||
<tag>fail</tag>
|
||||
Unable to download file
|
||||
<tag>fail</tag>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
name="MediaFileDownloadUnsupported"
|
||||
label=""
|
||||
type="alert">
|
||||
<unique/>
|
||||
<tag>confirm</tag>
|
||||
You have requested a file download, which is not supported within [SECOND_LIFE].
|
||||
<usetemplate
|
||||
ignoretext="Warn about unsupported file downloads"
|
||||
name="okignore"
|
||||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
name="CannotWriteFile"
|
||||
|
|
|
|||
Loading…
Reference in New Issue