diff options
Diffstat (limited to 'indra/llui/llui.cpp')
-rw-r--r-- | indra/llui/llui.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 1cb6972370..1d3e5d7a15 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -50,6 +50,7 @@ // Project includes #include "llcontrol.h" #include "llui.h" +#include "lluicolortable.h" #include "llview.h" #include "lllineeditor.h" #include "llfloater.h" @@ -57,6 +58,10 @@ #include "llmenugl.h" #include "llwindow.h" +// for registration +#include "llsearcheditor.h" +#include "llflyoutbutton.h" + // for XUIParse #include "llquaternion.h" #include <boost/tokenizer.hpp> @@ -84,6 +89,10 @@ std::list<std::string> gUntranslated; /*static*/ std::vector<std::string> LLUI::sXUIPaths; +// register searcheditor here +static LLDefaultWidgetRegistry::Register<LLSearchEditor> register_search_editor("search_editor"); +static LLDefaultWidgetRegistry::Register<LLFlyoutButton> register_flyout_button("flyout_button"); + // // Functions @@ -1697,7 +1706,7 @@ void LLUI::getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y) // static std::string LLUI::getLanguage() { - std::string language = "en-us"; + std::string language = "en"; if (sSettingGroups["config"]) { language = sSettingGroups["config"]->getString("Language"); @@ -1711,7 +1720,7 @@ std::string LLUI::getLanguage() } if (language.empty() || language == "default") { - language = "en-us"; + language = "en"; } } return language; @@ -1744,7 +1753,7 @@ void LLUI::setupPaths() else // parsing failed { std::string slash = gDirUtilp->getDirDelimiter(); - std::string dir = "xui" + slash + "en-us"; + std::string dir = "xui" + slash + "en"; llwarns << "XUI::config file unable to open: " << filename << llendl; sXUIPaths.push_back(dir); } @@ -1771,7 +1780,7 @@ std::string LLUI::locateSkin(const std::string& filename) } if (!gDirUtilp->fileExists(found_file)) { - std::string local_skin = "xui" + slash + "en-us" + slash + filename; + std::string local_skin = "xui" + slash + "en" + slash + filename; found_file = gDirUtilp->findSkinnedFilename(local_skin); } if (!gDirUtilp->fileExists(found_file)) @@ -1858,8 +1867,11 @@ LLControlGroup& LLUI::getControlControlGroup (const std::string& controlname) for (settings_map_t::iterator itor = sSettingGroups.begin(); itor != sSettingGroups.end(); ++itor) { - if (sSettingGroups[(itor->first)]->controlExists(controlname)) - return *sSettingGroups[(itor->first)]; + if(itor->second!= NULL) + { + if (sSettingGroups[(itor->first)]->controlExists(controlname)) + return *sSettingGroups[(itor->first)]; + } } return *sSettingGroups["config"]; // default group @@ -1943,7 +1955,7 @@ namespace LLInitParam { if (control.isProvided()) { - return LLUI::getCachedColorFunctor(control); + return LLUIColorTable::instance().getColor(control); } else { |