summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2013-05-09 14:10:45 -0700
committersimon <none@none>2013-05-09 14:10:45 -0700
commitee2fce8790b69d61845cc32fbf7cdce8a33b0dab (patch)
tree5060f42dca293102c868038f127c1a74f5c4a6aa /indra/newview/llviewerwindow.cpp
parentcd8e0b92e1c8f9f8544b1011e61c21c7789b93b7 (diff)
parent8895e795763d14c3dae495b3648da3d4a52ba30a (diff)
Merge downstream code and viewer-beta
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 c65caea3ec..4da570960f 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"
@@ -2292,29 +2293,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)
{