From 12810aeb0cc9c252d9295101d06dd0eb8711d8c6 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 7 Sep 2010 23:35:39 -0700 Subject: Fixed 'there is no media type for text/html' errors --- linden/indra/newview/llmimetypes.cpp | 18 + .../newview/skins/default/xui/en-us/mime_types.xml | 451 +++++++++++++++++++++ 2 files changed, 469 insertions(+) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llmimetypes.cpp b/linden/indra/newview/llmimetypes.cpp index 525e89c..c45e0ab 100644 --- a/linden/indra/newview/llmimetypes.cpp +++ b/linden/indra/newview/llmimetypes.cpp @@ -56,6 +56,24 @@ bool LLMIMETypes::parseMIMETypes(const std::string& xml_filename) { LLXMLNodePtr root; bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + + if (!success) + { + // If fails, check if we can read the file from the app_settings folder + std::string settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, xml_filename); + success = LLUICtrlFactory::getLayeredXMLNode(settings_filename, root); + + #if LL_WINDOWS + // On the windows dev builds, unpackaged, the mime_types.xml file will be located in + // indra/build-vc**/newview//app_settings. + if (!success) + { + settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "app_settings", xml_filename); + success = LLUICtrlFactory::getLayeredXMLNode(settings_filename, root); + } + #endif + } + if ( ! success || root.isNull() || ! root->hasName( "mimetypes" ) ) { llwarns << "Unable to read MIME type file: " diff --git a/linden/indra/newview/skins/default/xui/en-us/mime_types.xml b/linden/indra/newview/skins/default/xui/en-us/mime_types.xml index e69de29..9f0c631 100644 --- a/linden/indra/newview/skins/default/xui/en-us/mime_types.xml +++ b/linden/indra/newview/skins/default/xui/en-us/mime_types.xml @@ -0,0 +1,451 @@ + + + + (Unknown) + + + none + + + media_plugin_webkit + + + + + icn_media_web.tga + + + text/html + + + This location has Web content + + + Show Web content + + + true + + + false + + + + + + video/* + + + icn_media_movie.tga + + + There is a movie to play here + + + Play movie + + + false + + + true + + + + + + icn_media_web.tga + + + image/* + + + There is an image at this location + + + View this location's image + + + false + + + false + + + + + + icn_media_web.tga + + + audio/* + + + There is audio at this location + + + Play this location's audio + + + false + + + true + + + + + + movie + + + media_plugin_quicktime + + + + + + none + + + media_plugin_quicktime + + + + + + none + + + + + + audio + + + media_plugin_quicktime + + + + + + movie + + + media_plugin_quicktime + + + + + + image + + + + + + movie + + + media_plugin_quicktime + + + + + + web + + + + + + audio + + + + + + image + + + + + + image + + + + + + image + + + + + + movie + + + media_plugin_quicktime + + + + + + web + + + + + + image + + + + + + audio + + + media_plugin_quicktime + + + + + + audio + + + media_plugin_quicktime + + + + + + audio + + + media_plugin_quicktime + + + + + + audio + + + media_plugin_quicktime + + + + + + image + + + media_plugin_webkit + + + + + + image + + + media_plugin_webkit + + + + + + image + + + media_plugin_webkit + + + + + + image + + + media_plugin_webkit + + + + + + image + + + media_plugin_webkit + + + + + + image + + + media_plugin_webkit + + + + + + web + + + media_plugin_webkit + + + + + + text + + + media_plugin_webkit + + + + + + text + + + media_plugin_webkit + + + + + + movie + + + media_plugin_quicktime + + + + + + movie + + + media_plugin_quicktime + + + + + + movie + + + media_plugin_quicktime + + + + + + movie + + + media_plugin_quicktime + + + + + + movie + + + media_plugin_quicktime + + + + + + movie + + + media_plugin_quicktime + + + -- cgit v1.1