diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-20 12:41:00 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-20 12:41:00 +0100 |
commit | f33fff7e15947859f9c89cd5297971a28205bca8 (patch) | |
tree | 4abe6618d6bc69432707f23369587190d1ef544d /indra/newview/llmimetypes.cpp | |
parent | e275b7a658ee29ca4ce3dd77908ddd4c34749449 (diff) | |
parent | 5952fbca316ba1d1e4243bf5ebd6dc647e4957f4 (diff) |
slightly hairy merge from viewer-trunk
Diffstat (limited to 'indra/newview/llmimetypes.cpp')
-rw-r--r-- | indra/newview/llmimetypes.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp index 235487cf46..7bddc0d84c 100644 --- a/indra/newview/llmimetypes.cpp +++ b/indra/newview/llmimetypes.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llmimetypes.h" +#include "lltrans.h" #include "llxmlnode.h" #include "lluictrlfactory.h" @@ -49,6 +50,7 @@ std::string sDefaultImpl; // Returned when we don't know what impl to use std::string sXMLFilename; // Squirrel away XML filename so we know how to reset +std::string DEFAULT_MIME_TYPE = "none/none"; ///////////////////////////////////////////////////////////////////////////// @@ -212,7 +214,7 @@ std::string LLMIMETypes::findIcon(const std::string& mime_type) // static std::string LLMIMETypes::findDefaultMimeType(const std::string& widget_type) { - std::string mime_type = "none/none"; + std::string mime_type = getDefaultMimeType(); mime_widget_set_map_t::iterator it = sWidgetMap.find(widget_type); if(it != sWidgetMap.end()) { @@ -222,6 +224,18 @@ std::string LLMIMETypes::findDefaultMimeType(const std::string& widget_type) } // static +const std::string& LLMIMETypes::getDefaultMimeType() +{ + return DEFAULT_MIME_TYPE; +} + +const std::string& LLMIMETypes::getDefaultMimeTypeTranslation() +{ + static std::string mime_type = LLTrans::getString("DefaultMimeType"); + return mime_type; +} + +// static std::string LLMIMETypes::findToolTip(const std::string& mime_type) { std::string tool_tip = ""; |