summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-05-22 11:23:51 -0700
committerMerov Linden <merov@lindenlab.com>2013-05-22 11:23:51 -0700
commit2113bb8159cda689e8a6001d2d1548cb2c6ab50f (patch)
treee004263a4b646ff0c1f6f0d5319977c9bff807c4 /indra/newview/llviewerwindow.cpp
parent34142d3f44d8f2a6fa5fb1ccf03f1ade1730c881 (diff)
parent0ebcb7e3fd1452d42b5ca48139f99a4fd632d235 (diff)
Pull merge from viewer-release
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp48
1 files changed, 31 insertions, 17 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index a427770403..04e5447abf 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -34,6 +34,7 @@
#include <fstream>
#include <algorithm>
#include <boost/lambda/core.hpp>
+#include <boost/regex.hpp>
#include "llagent.h"
#include "llagentcamera.h"
@@ -2248,29 +2249,42 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
// no l10n problem because channel is always an english string
std::string channel = LLVersionInfo::getChannel();
- bool isProject = (channel.find("Project") != std::string::npos);
+ 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 && LLGridManager::getInstance()->isInProductionGrid())
+ if ( god_mode )
{
- new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" );
- }
- else if(god_mode && !LLGridManager::getInstance()->isInProductionGrid())
- {
- new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" );
+ if ( LLGridManager::getInstance()->isInProductionGrid() )
+ {
+ new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" );
+ }
+ else
+ {
+ new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" );
+ }
}
- else if (!god_mode && isProject)
+ 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(!god_mode && !LLGridManager::getInstance()->isInProductionGrid())
- {
- new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" );
- }
- else
- {
- new_bg_color = LLUIColorTable::instance().getColor( "MenuBarBgColor" );
- }
+ }
+ 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" );
+ }
if(gMenuBarView)
{