From b2200f06dacfde4fe62a8f7f252e941c65d71c72 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 22 Apr 2015 16:06:48 -0400 Subject: MAINT-5147: correct menu colors for test viewers --- indra/newview/llversioninfo.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'indra/newview/llversioninfo.cpp') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 6a8fad0134..178ea3d50e 100755 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -133,3 +133,43 @@ void LLVersionInfo::resetChannel(const std::string& channel) sWorkingChannelName = channel; sVersionChannel.clear(); // Reset version and channel string til next use. } + +//static +ViewerMaturity getViewerMaturity() +{ + ViewerMaturity maturity; + + std::string channel = getChannel(); + + static const boost::regex is_test_channel("\\bTest\\b"); + static const boost::regex is_beta_channel("\\bBeta\\b"); + static const boost::regex is_project_channel("\\bProject\\b"); + static const boost::regex is_release_channel("\\bRelease\\b"); + + if (boost::regex_search(channel, is_release_channel)) + { + maturity = RELEASE_VIEWER; + } + else if (boost::regex_search(channel, is_beta_channel)) + { + maturity = BETA_VIEWER; + } + else if (boost::regex_search(channel, is_project_channel)) + { + maturity = PROJECT_VIEWER; + } + else if (boost::regex_search(channel, is_test_channel)) + { + maturity = TEST_VIEWER; + } + else + { + LL_WARNS() << "Channel '" << channel + << "' does not follow naming convention, assuming Test" + << LL_ENDL; + maturity = TEST_VIEWER; + } + return maturity; +} + + -- cgit v1.2.3 From a6a428910cccdbf4ef137399c09be185226dd8f5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 28 Apr 2015 13:54:15 +0300 Subject: build fix --- indra/newview/llversioninfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llversioninfo.cpp') diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index ec831738a9..e53de8be32 100755 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -29,6 +29,7 @@ #include #include #include "llversioninfo.h" +#include #if ! defined(LL_VIEWER_CHANNEL) \ || ! defined(LL_VIEWER_VERSION_MAJOR) \ @@ -133,7 +134,7 @@ void LLVersionInfo::resetChannel(const std::string& channel) } //static -ViewerMaturity getViewerMaturity() +LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity() { ViewerMaturity maturity; -- cgit v1.2.3