summaryrefslogtreecommitdiff
path: root/indra/llui/llui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llui.cpp')
-rw-r--r--indra/llui/llui.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index 6ef485d82c..ac263250ff 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -63,8 +63,8 @@ const LLColor4 UI_VERTEX_COLOR(1.f, 1.f, 1.f, 1.f);
BOOL gShowTextEditCursor = TRUE;
// Language for UI construction
-std::map<LLString, LLString> gTranslation;
-std::list<LLString> gUntranslated;
+std::map<std::string, std::string> gTranslation;
+std::list<std::string> gUntranslated;
LLControlGroup* LLUI::sConfigGroup = NULL;
LLControlGroup* LLUI::sColorsGroup = NULL;
@@ -80,8 +80,9 @@ BOOL LLUI::sQAMode = FALSE;
//
// Functions
//
-void make_ui_sound(const LLString& name)
+void make_ui_sound(const char* namep)
{
+ std::string name = ll_safe_string(namep);
if (!LLUI::sConfigGroup->controlExists(name))
{
llwarns << "tried to make ui sound for unknown sound name: " << name << llendl;
@@ -1557,7 +1558,7 @@ void LLUI::initClass(LLControlGroup* config,
LLImageProviderInterface* image_provider,
LLUIAudioCallback audio_callback,
const LLVector2* scale_factor,
- const LLString& language)
+ const std::string& language)
{
sConfigGroup = config;
sColorsGroup = colors;
@@ -1647,10 +1648,10 @@ void LLUI::setCursorPositionLocal(const LLView* viewp, S32 x, S32 y)
}
//static
-LLString LLUI::locateSkin(const LLString& filename)
+std::string LLUI::locateSkin(const std::string& filename)
{
- LLString slash = gDirUtilp->getDirDelimiter();
- LLString found_file = filename;
+ std::string slash = gDirUtilp->getDirDelimiter();
+ std::string found_file = filename;
if (!gDirUtilp->fileExists(found_file))
{
found_file = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename); // Should be CUSTOM_SKINS?
@@ -1659,18 +1660,18 @@ LLString LLUI::locateSkin(const LLString& filename)
{
if (!gDirUtilp->fileExists(found_file))
{
- LLString localization(sConfigGroup->getString("Language"));
+ std::string localization(sConfigGroup->getString("Language"));
if(localization == "default")
{
localization = sConfigGroup->getString("SystemLanguage");
}
- LLString local_skin = "xui" + slash + localization + slash + filename;
+ std::string local_skin = "xui" + slash + localization + slash + filename;
found_file = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, local_skin);
}
}
if (!gDirUtilp->fileExists(found_file))
{
- LLString local_skin = "xui" + slash + "en-us" + slash + filename;
+ std::string local_skin = "xui" + slash + "en-us" + slash + filename;
found_file = gDirUtilp->getExpandedFilename(LL_PATH_SKINS, local_skin);
}
if (!gDirUtilp->fileExists(found_file))
@@ -1718,7 +1719,7 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen)
}
//static
-LLUIImage* LLUI::getUIImage(const LLString& name)
+LLUIImage* LLUI::getUIImage(const std::string& name)
{
if (!name.empty())
return sImageProvider->getUIImage(name);
@@ -1806,7 +1807,7 @@ LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled)
// LLUIImage
//
-LLUIImage::LLUIImage(const LLString& name, LLPointer<LLImageGL> image) :
+LLUIImage::LLUIImage(const std::string& name, LLPointer<LLImageGL> image) :
mName(name),
mImage(image),
mScaleRegion(0.f, 1.f, 1.f, 0.f),