summaryrefslogtreecommitdiff
path: root/indra/newview/llversioninfo.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-04-22 16:06:48 -0400
committerOz Linden <oz@lindenlab.com>2015-04-22 16:06:48 -0400
commitb2200f06dacfde4fe62a8f7f252e941c65d71c72 (patch)
treed1a0832db8677b44cb79a030dcc45889886a8ba6 /indra/newview/llversioninfo.cpp
parent749cf1b257267dee5ba7339d5269b1b103f28dc0 (diff)
MAINT-5147: correct menu colors for test viewers
Diffstat (limited to 'indra/newview/llversioninfo.cpp')
-rwxr-xr-xindra/newview/llversioninfo.cpp40
1 files changed, 40 insertions, 0 deletions
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;
+}
+
+