diff options
author | Oz Linden <oz@lindenlab.com> | 2015-08-18 15:05:01 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-08-18 15:05:01 -0400 |
commit | 2efe91ef64a963ef488d6018d04196753fe815ca (patch) | |
tree | 09b198468fcc4b7a9405e68f355413aafde1d1b9 /indra/newview/llviewerwindow.cpp | |
parent | dff79705eddd4ce92fbb3d8a3b3b47a734b4837b (diff) | |
parent | 1be63209331d509396bd7ee79302d511fe83d72e (diff) |
merge changes for 3.8.3-release
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-x | indra/newview/llviewerwindow.cpp | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0f3b201c1a..501ad0ad1b 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2336,12 +2336,6 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) LLSD args; LLColor4 new_bg_color; - // no l10n problem because channel is always an english string - std::string channel = LLVersionInfo::getChannel(); - static const boost::regex is_beta_channel("\\bBeta\\b"); - static const boost::regex is_project_channel("\\bProject\\b"); - static const boost::regex is_test_channel("\\bTest$"); - // god more important than project, proj more important than grid if ( god_mode ) { @@ -2354,27 +2348,35 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" ); } } - else if (boost::regex_search(channel, is_beta_channel)) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBetaBgColor" ); - } - else if (boost::regex_search(channel, is_project_channel)) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarProjectBgColor" ); - } - else if (boost::regex_search(channel, is_test_channel)) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarTestBgColor" ); - } - else if(!LLGridManager::getInstance()->isInProductionGrid()) - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); - } - else - { - new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); - } - + else + { + switch (LLVersionInfo::getViewerMaturity()) + { + case LLVersionInfo::TEST_VIEWER: + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarTestBgColor" ); + break; + + case LLVersionInfo::PROJECT_VIEWER: + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarProjectBgColor" ); + break; + + case LLVersionInfo::BETA_VIEWER: + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBetaBgColor" ); + break; + + case LLVersionInfo::RELEASE_VIEWER: + if(!LLGridManager::getInstance()->isInProductionGrid()) + { + new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); + } + else + { + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); + } + break; + } + } + if(gMenuBarView) { gMenuBarView->setBackgroundColor( new_bg_color ); |