diff options
author | Dave Parks <davep@lindenlab.com> | 2010-09-08 16:11:54 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-09-08 16:11:54 -0500 |
commit | a114783a7b609711c691bcd37cdb81de369a6638 (patch) | |
tree | 09bb6ae5bd3e2e913ddeeca55067f787e51a2380 /indra/newview/llviewerwindow.cpp | |
parent | 35ad7ace9071e73056690c1212b31cd001985b9f (diff) | |
parent | 4a8d59367a695fedff21a71d35bcad3f729f6060 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 13db913f60..43d18c6d83 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -156,6 +156,7 @@ #include "lltrans.h" #include "lluictrlfactory.h" #include "llurldispatcher.h" // SLURL from other app instance +#include "llversioninfo.h" #include "llvieweraudio.h" #include "llviewercamera.h" #include "llviewergesture.h" @@ -1932,6 +1933,11 @@ 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(); + bool isProject = (channel.find("Project") != std::string::npos); + + // god more important than project, proj more important than grid if(god_mode && LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuBarGodBgColor" ); @@ -1940,6 +1946,10 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionGodBgColor" ); } + else if (!god_mode && isProject) + { + new_bg_color = LLUIColorTable::instance().getColor( "MenuBarProjectBgColor" ); + } else if(!god_mode && !LLGridManager::getInstance()->isInProductionGrid()) { new_bg_color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); @@ -3901,7 +3911,14 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei image_buffer_x = llfloor(snapshot_width*scale_factor) ; image_buffer_y = llfloor(snapshot_height *scale_factor) ; } - raw->resize(image_buffer_x, image_buffer_y, 3); + if(image_buffer_x > 0 && image_buffer_y > 0) + { + raw->resize(image_buffer_x, image_buffer_y, 3); + } + else + { + return FALSE ; + } if(raw->isBufferInvalid()) { return FALSE ; |