summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-01-12 13:16:28 -0800
committerRichard Linden <none@none>2012-01-12 13:16:28 -0800
commitf1c27071047e776536f8aa963b83f8772275e7c3 (patch)
treea0a74e20cdb688471af361c8fc078260bd7988dc /indra
parent3dfb1536fa3bb85f6648a76591e80c3feea9eb83 (diff)
parent26829e6fa2de6e59f46ba340ca7ad6c430728470 (diff)
Automated merge with https://bitbucket.org/lindenlab/viewer-development
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsys.cpp18
-rw-r--r--indra/llui/lltoolbar.cpp9
-rw-r--r--indra/llui/lltoolbar.h1
-rw-r--r--indra/llui/llview.cpp11
-rw-r--r--indra/llwindow/llwindowwin32.cpp31
-rw-r--r--indra/newview/llfloaterimagepreview.cpp11
-rw-r--r--indra/newview/llinventorymodel.h1
-rw-r--r--indra/newview/llviewerwindow.cpp3
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_wizard.xml32
9 files changed, 84 insertions, 33 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 19075afa68..6073bcd0a6 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -1364,11 +1364,21 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */
if (! src) goto err;
- do
+ while ((bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE, src)) > 0)
{
- bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE,src);
- gzwrite(dst, buffer, bytes);
- } while(feof(src) == 0);
+ if (gzwrite(dst, buffer, bytes) <= 0)
+ {
+ llwarns << "gzwrite failed: " << gzerror(dst, NULL) << llendl;
+ goto err;
+ }
+ }
+
+ if (ferror(src))
+ {
+ llwarns << "Error reading " << srcfile << llendl;
+ goto err;
+ }
+
gzclose(dst);
dst = NULL;
#if LL_WINDOWS
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 7f96c1373c..9b31a6449d 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -151,14 +151,20 @@ void LLToolBar::createContextMenu()
if (menu)
{
menu->setBackgroundColor(LLUIColorTable::instance().getColor("MenuPopupBgColor"));
-
mPopupMenuHandle = menu->getHandle();
+ mRemoveButtonHandle = menu->getChild<LLView>("Remove button")->getHandle();
}
else
{
llwarns << "Unable to load toolbars context menu." << llendl;
}
}
+
+ if (mRemoveButtonHandle.get())
+ {
+ // Disable/Enable the "Remove button" menu item depending on whether or not a button was clicked
+ mRemoveButtonHandle.get()->setEnabled(mRightMouseTargetButton != NULL);
+ }
}
void LLToolBar::initFromParams(const LLToolBar::Params& p)
@@ -401,6 +407,7 @@ BOOL LLToolBar::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
// Determine which button the mouse was over during the click in case the context menu action
// is intended to affect the button.
+ mRightMouseTargetButton = NULL;
BOOST_FOREACH(LLToolBarButton* button, mButtons)
{
LLRect button_rect;
diff --git a/indra/llui/lltoolbar.h b/indra/llui/lltoolbar.h
index 51fe23ddd1..a50c60282c 100644
--- a/indra/llui/lltoolbar.h
+++ b/indra/llui/lltoolbar.h
@@ -271,6 +271,7 @@ private:
LLLayoutStack* mCenteringStack;
LLPanel* mButtonPanel;
LLHandle<class LLContextMenu> mPopupMenuHandle;
+ LLHandle<class LLView> mRemoveButtonHandle;
LLToolBarButton* mRightMouseTargetButton;
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 542f57ee5f..004681325f 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -282,9 +282,6 @@ void LLView::moveChildToBackOfTabGroup(LLUICtrl* child)
// virtual
bool LLView::addChild(LLView* child, S32 tab_group)
{
- // NOTE: Changed this to not crash in release mode
- llassert(mInDraw == false);
-
if (!child)
{
return false;
@@ -334,10 +331,11 @@ bool LLView::addChildInBack(LLView* child, S32 tab_group)
// remove the specified child from the view, and set it's parent to NULL.
void LLView::removeChild(LLView* child)
{
- llassert_always(mInDraw == false);
//llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs
if (child->mParentView == this)
{
+ // if we are removing an item we are currently iterating over, that would be bad
+ llassert(child->mInDraw == false);
mChildList.remove( child );
child->mParentView = NULL;
if (child->isCtrl())
@@ -1086,7 +1084,6 @@ void LLView::draw()
void LLView::drawChildren()
{
- mInDraw = true;
if (!mChildList.empty())
{
LLView* rootp = LLUI::getRootView();
@@ -1105,7 +1102,10 @@ void LLView::drawChildren()
LLUI::pushMatrix();
{
LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f);
+ // flag the fact we are in draw here, in case overridden draw() method attempts to remove this widget
+ viewp->mInDraw = true;
viewp->draw();
+ viewp->mInDraw = false;
if (sDebugRects)
{
@@ -1125,7 +1125,6 @@ void LLView::drawChildren()
}
--sDepth;
}
- mInDraw = false;
}
void LLView::dirtyRect()
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 52c27b6736..954b9f2b15 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1083,6 +1083,37 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
return FALSE;
}
+ // (EXP-1765) dump pixel data to see if there is a pattern that leads to unreproducible crash
+ LL_INFOS("Window") << "--- begin pixel format dump ---" << llendl ;
+ LL_INFOS("Window") << "pixel_format is " << pixel_format << llendl ;
+ LL_INFOS("Window") << "pfd.nSize: " << pfd.nSize << llendl ;
+ LL_INFOS("Window") << "pfd.nVersion: " << pfd.nVersion << llendl ;
+ LL_INFOS("Window") << "pfd.dwFlags: 0x" << std::hex << pfd.dwFlags << std::dec << llendl ;
+ LL_INFOS("Window") << "pfd.iPixelType: " << (int)pfd.iPixelType << llendl ;
+ LL_INFOS("Window") << "pfd.cColorBits: " << (int)pfd.cColorBits << llendl ;
+ LL_INFOS("Window") << "pfd.cRedBits: " << (int)pfd.cRedBits << llendl ;
+ LL_INFOS("Window") << "pfd.cRedShift: " << (int)pfd.cRedShift << llendl ;
+ LL_INFOS("Window") << "pfd.cGreenBits: " << (int)pfd.cGreenBits << llendl ;
+ LL_INFOS("Window") << "pfd.cGreenShift: " << (int)pfd.cGreenShift << llendl ;
+ LL_INFOS("Window") << "pfd.cBlueBits: " << (int)pfd.cBlueBits << llendl ;
+ LL_INFOS("Window") << "pfd.cBlueShift: " << (int)pfd.cBlueShift << llendl ;
+ LL_INFOS("Window") << "pfd.cAlphaBits: " << (int)pfd.cAlphaBits << llendl ;
+ LL_INFOS("Window") << "pfd.cAlphaShift: " << (int)pfd.cAlphaShift << llendl ;
+ LL_INFOS("Window") << "pfd.cAccumBits: " << (int)pfd.cAccumBits << llendl ;
+ LL_INFOS("Window") << "pfd.cAccumRedBits: " << (int)pfd.cAccumRedBits << llendl ;
+ LL_INFOS("Window") << "pfd.cAccumGreenBits: " << (int)pfd.cAccumGreenBits << llendl ;
+ LL_INFOS("Window") << "pfd.cAccumBlueBits: " << (int)pfd.cAccumBlueBits << llendl ;
+ LL_INFOS("Window") << "pfd.cAccumAlphaBits: " << (int)pfd.cAccumAlphaBits << llendl ;
+ LL_INFOS("Window") << "pfd.cDepthBits: " << (int)pfd.cDepthBits << llendl ;
+ LL_INFOS("Window") << "pfd.cStencilBits: " << (int)pfd.cStencilBits << llendl ;
+ LL_INFOS("Window") << "pfd.cAuxBuffers: " << (int)pfd.cAuxBuffers << llendl ;
+ LL_INFOS("Window") << "pfd.iLayerType: " << (int)pfd.iLayerType << llendl ;
+ LL_INFOS("Window") << "pfd.bReserved: " << (int)pfd.bReserved << llendl ;
+ LL_INFOS("Window") << "pfd.dwLayerMask: " << pfd.dwLayerMask << llendl ;
+ LL_INFOS("Window") << "pfd.dwVisibleMask: " << pfd.dwVisibleMask << llendl ;
+ LL_INFOS("Window") << "pfd.dwDamageMask: " << pfd.dwDamageMask << llendl ;
+ LL_INFOS("Window") << "--- end pixel format dump ---" << llendl ;
+
if (pfd.cColorBits < 32)
{
close();
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 69de15d9ea..92ee8ddac6 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -63,6 +63,7 @@
const S32 PREVIEW_BORDER_WIDTH = 2;
const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH;
const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE;
+const S32 PREVIEW_VPAD = -24; // yuk, hard coded
const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16;
const S32 PREVIEW_TEXTURE_HEIGHT = 320;
@@ -99,7 +100,7 @@ BOOL LLFloaterImagePreview::postBuild()
childSetCommitCallback("clothing_type_combo", onPreviewTypeCommit, this);
mPreviewRect.set(PREVIEW_HPAD,
- PREVIEW_TEXTURE_HEIGHT,
+ PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD,
getRect().getWidth() - PREVIEW_HPAD,
PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
mPreviewImageRect.set(0.f, 1.f, 1.f, 0.f);
@@ -271,13 +272,13 @@ void LLFloaterImagePreview::draw()
gGL.begin( LLRender::QUADS );
{
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
- gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
+ gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mBottom);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop);
- gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
+ gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
}
gGL.end();
@@ -303,13 +304,13 @@ void LLFloaterImagePreview::draw()
gGL.begin( LLRender::QUADS );
{
gGL.texCoord2f(0.f, 1.f);
- gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
+ gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
gGL.texCoord2f(0.f, 0.f);
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 0.f);
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
gGL.texCoord2f(1.f, 1.f);
- gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
+ gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
}
gGL.end();
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 0a564d353a..19d1e4e01f 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -64,6 +64,7 @@ class LLInventoryCollectFunctor;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryModel
{
+ LOG_CLASS(LLInventoryModel);
public:
friend class LLInventoryModelFetchDescendentsResponder;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b73be4ed43..4499955dec 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1206,7 +1206,8 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
mWindow->showCursorFromMouseMove();
- if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME
+ && !gDisconnected)
{
gAgent.clearAFK();
}
diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
index 9c0af7d9ba..62b8c5f96e 100644
--- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
@@ -108,7 +108,7 @@
height="22"
top_pad="15"
width="505"
- name="header_panel"
+ name="choose_file_header_panel"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true"
@@ -117,7 +117,7 @@
width="200"
left="10"
top="3"
- name="header_text"
+ name="choose_file_header_text"
text_color="White"
height="10"
font="SansSerifBig"
@@ -130,7 +130,7 @@
left="15"
height="310"
width="505"
- name="content"
+ name="choose_file_content"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true">
@@ -287,7 +287,7 @@
<panel
height="22"
top_pad="15"
- name="header_panel"
+ name="optimize_header_panel"
width="505"
bg_opaque_color="DkGray2"
background_visible="true"
@@ -296,7 +296,7 @@
<text
width="200"
left="10"
- name="header_text"
+ name="optimize_header_text"
top="3"
text_color="White"
height="10"
@@ -311,7 +311,7 @@
height="20"
font="SansSerifSmall"
layout="topleft"
- name="description"
+ name="optimize_description"
word_wrap="true"
left_delta="5">
We have optimized the model for performance. Adjust it further if you wish.
@@ -322,7 +322,7 @@
left="15"
height="270"
width="505"
- name="content"
+ name="optimize_content"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true">
@@ -497,7 +497,7 @@ Higher prim weight</text>
<panel
height="22"
top_pad="15"
- name="header_panel"
+ name="physics_header_panel"
width="505"
bg_opaque_color="DkGray2"
background_visible="true"
@@ -506,7 +506,7 @@ Higher prim weight</text>
<text
width="200"
left="10"
- name="header_text"
+ name="physics_header_text"
top="3"
height="10"
font="SansSerifBig"
@@ -521,7 +521,7 @@ Higher prim weight</text>
height="50"
font="SansSerifSmall"
layout="topleft"
- name="description"
+ name="physics_description"
word_wrap="true"
left_delta="5">
We will create a shape for the outer hull of the model. Adjust the shape's detail level as needed for the intended purpose of your model.
@@ -531,7 +531,7 @@ Higher prim weight</text>
left="15"
height="270"
width="505"
- name="content"
+ name="physics_content"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true">
@@ -635,7 +635,7 @@ Buildings</text>
<panel
height="22"
top_pad="15"
- name="header_panel"
+ name="review_header_panel"
width="505"
bg_opaque_color="DkGray2"
background_visible="true"
@@ -644,7 +644,7 @@ Buildings</text>
<text
width="200"
left="10"
- name="header_text"
+ name="review_header_text"
text_color="White"
top="3"
height="10"
@@ -658,7 +658,7 @@ Buildings</text>
left="15"
height="310"
width="505"
- name="content"
+ name="review_content"
bg_opaque_color="DkGray2"
background_visible="true"
background_opaque="true">
@@ -706,7 +706,7 @@ Buildings</text>
<panel
height="22"
top_pad="15"
- name="header_panel"
+ name="upload_header_panel"
width="505"
bg_opaque_color="DkGray2"
background_visible="true"
@@ -715,7 +715,7 @@ Buildings</text>
<text
width="200"
left="10"
- name="header_text"
+ name="upload_header_text"
top="3"
text_color="White"
height="10"