diff options
Diffstat (limited to 'indra/newview/llpanellandmedia.cpp')
-rw-r--r-- | indra/newview/llpanellandmedia.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index 42ad9820a8..e834e229cd 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -153,7 +153,7 @@ void LLPanelLandMedia::refresh() std::string mime_type = parcel->getMediaType(); if (mime_type.empty()) { - mime_type = "none/none"; + mime_type = LLMIMETypes::getDefaultMimeTypeTranslation(); } setMediaType(mime_type); mMediaTypeCombo->setEnabled( can_change_media ); @@ -218,7 +218,7 @@ void LLPanelLandMedia::refresh() void LLPanelLandMedia::populateMIMECombo() { - std::string default_mime_type = "none/none"; + std::string default_mime_type = LLMIMETypes::getDefaultMimeType(); std::string default_label; LLMIMETypes::mime_widget_set_map_t::const_iterator it; for (it = LLMIMETypes::sWidgetMap.begin(); it != LLMIMETypes::sWidgetMap.end(); ++it) @@ -235,8 +235,7 @@ void LLPanelLandMedia::populateMIMECombo() mMediaTypeCombo->add(info.mLabel, mime_type); } } - // *TODO: The sort order is based on std::map key, which is - // ASCII-sorted and is wrong in other languages. TRANSLATE + mMediaTypeCombo->add( default_label, default_mime_type, ADD_BOTTOM ); } @@ -248,7 +247,15 @@ void LLPanelLandMedia::setMediaType(const std::string& mime_type) std::string media_key = LLMIMETypes::widgetType(mime_type); mMediaTypeCombo->setValue(media_key); - childSetText("mime_type", mime_type); + + std::string mime_str = mime_type; + if(LLMIMETypes::getDefaultMimeType() == mime_type) + { + // Instead of showing predefined "none/none" we are going to show something + // localizable - "none" for example (see EXT-6542) + mime_str = LLMIMETypes::getDefaultMimeTypeTranslation(); + } + childSetText("mime_type", mime_str); } void LLPanelLandMedia::setMediaURL(const std::string& media_url) |