summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-09-16 12:02:24 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-09-16 12:02:24 -0700
commit60db8577a90be3ea3d4a06ab06232802be953286 (patch)
tree0fcedbdf478b3f518a0d5dc69b7d234406355d75 /indra/newview/llviewerwindow.cpp
parentae623c8068145f968f09ccf9bbdd90e993ca4283 (diff)
parent1dbcc3fff79b55038178e493df0cc0c3a4d66221 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index aa1e626e48..172026558f 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -157,6 +157,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"
@@ -1929,6 +1930,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" );
@@ -1937,6 +1943,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" );
@@ -3898,7 +3908,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 ;