summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-08-25 11:40:36 -0700
committerRider Linden <rider@lindenlab.com>2015-08-25 11:40:36 -0700
commit96bb17f20bbcdc595f3a615a3129e134595b3a4a (patch)
treee51e47f79b78a076e821360763196cc72c154aad /indra/newview/llviewerwindow.cpp
parent7c61728b4bae928b2461f0f933dd1c1fa34ef0aa (diff)
parent1be63209331d509396bd7ee79302d511fe83d72e (diff)
Merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp56
1 files changed, 29 insertions, 27 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e317989f04..ba84d7aa2c 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 );