Innitial commit. Pulled minor changes out of bulk of changes comming for multi-wearables.
This commit is contained in:
@@ -1,31 +1,25 @@
|
||||
/**
|
||||
* @file llgesture.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,31 +3,25 @@
|
||||
* @brief A gesture is a combination of a triggering chat phrase or
|
||||
* key, a sound, an animation, and a chat string.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llmultigesture.cpp
|
||||
* @brief Gestures that are asset-based and can have multiple steps.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2004-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -70,6 +70,10 @@ public:
|
||||
KEY mKey;
|
||||
MASK mMask;
|
||||
|
||||
// This name can be empty if the inventory item is not around and
|
||||
// the gesture manager has not yet set the name
|
||||
std::string mName;
|
||||
|
||||
// String, like "/foo" or "hello" that makes it play
|
||||
std::string mTrigger;
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llvisualparam.cpp
|
||||
* @brief Implementation of LLPolyMesh class.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llvisualparam.h
|
||||
* @brief Implementation of LLPolyMesh class.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ void LLPrimitive::setPCode(const U8 p_code)
|
||||
}
|
||||
|
||||
//===============================================================
|
||||
const LLTextureEntry* LLPrimitive::getTE(const U8 index) const
|
||||
LLTextureEntry* LLPrimitive::getTE(const U8 index) const
|
||||
{
|
||||
return mTextureList.getTexture(index);
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ public:
|
||||
|
||||
// Modify texture entry properties
|
||||
inline BOOL validTE(const U8 te_num) const;
|
||||
const LLTextureEntry *getTE(const U8 te_num) const;
|
||||
LLTextureEntry *getTE(const U8 te_num) const;
|
||||
|
||||
virtual void setNumTEs(const U8 num_tes);
|
||||
virtual void setAllTETextures(const LLUUID &tex_id);
|
||||
|
||||
@@ -661,7 +661,7 @@ void LLMenuItemTearOffGL::doIt()
|
||||
getMenu()->highlightNextItem(this);
|
||||
}
|
||||
|
||||
getMenu()->arrange();
|
||||
getMenu()->needsArrange();
|
||||
|
||||
LLFloater* parent_floater = mParentHandle.get();
|
||||
LLFloater* tear_off_menu = LLTearOffMenu::create(getMenu());
|
||||
@@ -1325,55 +1325,58 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask )
|
||||
|
||||
void LLMenuItemBranchGL::openMenu()
|
||||
{
|
||||
if(!getBranch()) return;
|
||||
LLMenuGL* branch = getBranch();
|
||||
if (!branch)
|
||||
return;
|
||||
|
||||
if (getBranch()->getTornOff())
|
||||
if (branch->getTornOff())
|
||||
{
|
||||
gFloaterView->bringToFront((LLFloater*)getBranch()->getParent());
|
||||
gFloaterView->bringToFront((LLFloater*)branch->getParent());
|
||||
// this might not be necessary, as torn off branches don't get focus and hence no highligth
|
||||
getBranch()->highlightNextItem(NULL);
|
||||
branch->highlightNextItem(NULL);
|
||||
}
|
||||
else if( !getBranch()->getVisible() )
|
||||
else if( !branch->getVisible() )
|
||||
{
|
||||
// get valid rectangle for menus
|
||||
const LLRect menu_region_rect = LLMenuGL::sMenuContainer->getMenuRect();
|
||||
|
||||
getBranch()->arrange();
|
||||
branch->arrange();
|
||||
|
||||
LLRect rect = getBranch()->getRect();
|
||||
LLRect branch_rect = branch->getRect();
|
||||
// calculate root-view relative position for branch menu
|
||||
S32 left = getRect().mRight;
|
||||
S32 top = getRect().mTop - getRect().mBottom;
|
||||
|
||||
localPointToOtherView(left, top, &left, &top, getBranch()->getParent());
|
||||
localPointToOtherView(left, top, &left, &top, branch->getParent());
|
||||
|
||||
rect.setLeftTopAndSize( left, top,
|
||||
rect.getWidth(), rect.getHeight() );
|
||||
branch_rect.setLeftTopAndSize( left, top,
|
||||
branch_rect.getWidth(), branch_rect.getHeight() );
|
||||
|
||||
if (getBranch()->getCanTearOff())
|
||||
if (branch->getCanTearOff())
|
||||
{
|
||||
rect.translate(0, TEAROFF_SEPARATOR_HEIGHT_PIXELS);
|
||||
branch_rect.translate(0, TEAROFF_SEPARATOR_HEIGHT_PIXELS);
|
||||
}
|
||||
getBranch()->setRect( rect );
|
||||
branch->setRect( branch_rect );
|
||||
S32 x = 0;
|
||||
S32 y = 0;
|
||||
getBranch()->localPointToOtherView( 0, 0, &x, &y, getBranch()->getParent() );
|
||||
S32 delta_x = 0;
|
||||
S32 delta_y = 0;
|
||||
branch->localPointToOtherView( 0, 0, &x, &y, branch->getParent() );
|
||||
if( y < menu_region_rect.mBottom )
|
||||
{
|
||||
delta_y = menu_region_rect.mBottom - y;
|
||||
}
|
||||
|
||||
S32 menu_region_width = menu_region_rect.getWidth();
|
||||
if( x - menu_region_rect.mLeft > menu_region_width - rect.getWidth() )
|
||||
if( x - menu_region_rect.mLeft > menu_region_width - branch_rect.getWidth() )
|
||||
{
|
||||
// move sub-menu over to left side
|
||||
delta_x = llmax(-x, (-1 * (rect.getWidth() + getRect().getWidth())));
|
||||
delta_x = llmax(-x, ( -(branch_rect.getWidth() + getRect().getWidth())));
|
||||
}
|
||||
getBranch()->translate( delta_x, delta_y );
|
||||
getBranch()->setVisible( TRUE );
|
||||
getBranch()->getParent()->sendChildToFront(getBranch());
|
||||
branch->translate( delta_x, delta_y );
|
||||
|
||||
branch->setVisible( TRUE );
|
||||
branch->getParent()->sendChildToFront(branch);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1705,7 +1708,8 @@ LLMenuGL::LLMenuGL( const std::string& name, const std::string& label, LLHandle<
|
||||
mSpilloverBranch(NULL),
|
||||
mSpilloverMenu(NULL),
|
||||
mParentFloaterHandle(parent_floater_handle),
|
||||
mJumpKey(KEY_NONE)
|
||||
mJumpKey(KEY_NONE),
|
||||
mNeedsArrange(FALSE)
|
||||
{
|
||||
mFadeTimer.stop();
|
||||
setCanTearOff(TRUE, parent_floater_handle);
|
||||
@@ -1753,7 +1757,7 @@ void LLMenuGL::setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_h
|
||||
mTearOffItem = new LLMenuItemTearOffGL(parent_floater_handle);
|
||||
mItems.insert(mItems.begin(), mTearOffItem);
|
||||
addChildAtEnd(mTearOffItem);
|
||||
arrange();
|
||||
needsArrange();
|
||||
}
|
||||
else if (!tear_off && mTearOffItem != NULL)
|
||||
{
|
||||
@@ -1761,7 +1765,7 @@ void LLMenuGL::setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_h
|
||||
removeChild(mTearOffItem);
|
||||
delete mTearOffItem;
|
||||
mTearOffItem = NULL;
|
||||
arrange();
|
||||
needsArrange();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2502,7 +2506,7 @@ void LLMenuGL::empty( void )
|
||||
void LLMenuGL::setLeftAndBottom(S32 left, S32 bottom)
|
||||
{
|
||||
setRect(LLRect(left, getRect().mTop, getRect().mRight, bottom));
|
||||
arrange();
|
||||
needsArrange();
|
||||
}
|
||||
|
||||
BOOL LLMenuGL::handleJumpKey(KEY key)
|
||||
@@ -2539,7 +2543,7 @@ BOOL LLMenuGL::append( LLMenuItemGL* item )
|
||||
|
||||
mItems.push_back( item );
|
||||
addChild( item );
|
||||
arrange();
|
||||
needsArrange();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2610,7 +2614,7 @@ BOOL LLMenuGL::remove( LLMenuItemGL* item )
|
||||
// Note that getMenu() will still not work since its parent isn't a menu.
|
||||
sMenuContainer->addChild( item );
|
||||
|
||||
arrange();
|
||||
needsArrange();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2648,6 +2652,7 @@ void LLMenuGL::setItemVisible( const std::string& name, BOOL visible )
|
||||
if( (*item_iter)->getName() == name )
|
||||
{
|
||||
(*item_iter)->setVisible( visible );
|
||||
needsArrange();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2978,17 +2983,20 @@ BOOL LLMenuGL::handleHover( S32 x, S32 y, MASK mask )
|
||||
|
||||
void LLMenuGL::draw( void )
|
||||
{
|
||||
if (mNeedsArrange)
|
||||
{
|
||||
arrange();
|
||||
mNeedsArrange = FALSE;
|
||||
}
|
||||
if (mDropShadowed && !mTornOff)
|
||||
{
|
||||
static LLColor4 color_drop_shadow = LLUI::sColorsGroup->getColor("ColorDropShadow");
|
||||
static S32 drop_shadow_floater = LLUI::sConfigGroup->getS32("DropShadowFloater");
|
||||
static LLColor4 color_drop_shadow = LLUI::sColorsGroup->getColor("ColorDropShadow");
|
||||
|
||||
gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
|
||||
color_drop_shadow,
|
||||
drop_shadow_floater );
|
||||
color_drop_shadow, drop_shadow_floater );
|
||||
}
|
||||
|
||||
LLColor4 bg_color = mBackgroundColor;
|
||||
|
||||
if( mBgVisible )
|
||||
{
|
||||
gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor );
|
||||
@@ -4464,7 +4472,7 @@ LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) :
|
||||
// flag menu as being torn off
|
||||
menup->setTornOff(TRUE);
|
||||
// update menu layout as torn off menu (no spillover menus)
|
||||
menup->arrange();
|
||||
menup->needsArrange();
|
||||
|
||||
LLRect rect;
|
||||
menup->localRectToOtherView(LLRect(-1, menup->getRect().getHeight(), menup->getRect().getWidth() + 3, 0), &rect, gFloaterView);
|
||||
@@ -4491,7 +4499,7 @@ LLTearOffMenu::LLTearOffMenu(LLMenuGL* menup) :
|
||||
void LLTearOffMenu::draw()
|
||||
{
|
||||
mMenu->setBackgroundVisible(isBackgroundOpaque());
|
||||
mMenu->arrange();
|
||||
mMenu->needsArrange();
|
||||
|
||||
if (getRect().getHeight() != mTargetHeight)
|
||||
{
|
||||
|
||||
@@ -477,6 +477,7 @@ public:
|
||||
|
||||
virtual BOOL isOpen();
|
||||
|
||||
void needsArrange() { mNeedsArrange = TRUE; }
|
||||
// Shape this menu to fit the current state of the children, and
|
||||
// adjust the child rects to fit. This is called automatically
|
||||
// when you add items. *FIX: We may need to deal with visibility
|
||||
@@ -541,6 +542,7 @@ protected:
|
||||
S32 mMouseVelY;
|
||||
BOOL mHorizontalLayout;
|
||||
BOOL mKeepFixedSize;
|
||||
BOOL mNeedsArrange;
|
||||
|
||||
private:
|
||||
static LLColor4 sDefaultBackgroundColor;
|
||||
|
||||
@@ -84,7 +84,7 @@ virtual void removeCtrl( LLUICtrl* ctrl);
|
||||
virtual BOOL canFocusChildren() const { return TRUE; }
|
||||
LLFolderView
|
||||
virtual void deleteAllChildren();
|
||||
LLFolderView, LLPanelInventory
|
||||
LLFolderView, LLPanelObjectInventory
|
||||
virtual void setTentative(BOOL b) {}
|
||||
LLUICtrl, LLSliderCtrl, LLSpinCtrl
|
||||
virtual BOOL getTentative() const { return FALSE; }
|
||||
|
||||
@@ -356,7 +356,7 @@ set(viewer_SOURCE_FILES
|
||||
llpanelgrouproles.cpp
|
||||
llpanelgroupvoting.cpp
|
||||
llpanelinput.cpp
|
||||
llpanelinventory.cpp
|
||||
llpanelobjectinventory.cpp
|
||||
llpanelland.cpp
|
||||
llpanellandaudio.cpp
|
||||
llpanellandmedia.cpp
|
||||
@@ -842,7 +842,7 @@ set(viewer_HEADER_FILES
|
||||
llpanelgrouproles.h
|
||||
llpanelgroupvoting.h
|
||||
llpanelinput.h
|
||||
llpanelinventory.h
|
||||
llpanelobjectinventory.h
|
||||
llpanelland.h
|
||||
llpanellandaudio.h
|
||||
llpanellandmedia.h
|
||||
|
||||
@@ -98,13 +98,11 @@ void LLPrefsAscentVan::onCommitClientTag(LLUICtrl* ctrl, void* userdata)
|
||||
gSavedSettings.setString("AscentReportClientUUID", client_uuid);
|
||||
gSavedSettings.setU32("AscentReportClientIndex", client_index);
|
||||
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
|
||||
if (avatar)
|
||||
if (gAgentAvatarp)
|
||||
{
|
||||
// Slam pending upload count to "unstick" things
|
||||
bool slam_for_debug = true;
|
||||
avatar->forceBakeAllTextures(slam_for_debug);
|
||||
gAgentAvatarp->forceBakeAllTextures(slam_for_debug);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "roles_constants.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llinventorybridge.h"
|
||||
|
||||
#include "llboost.h"
|
||||
|
||||
@@ -670,8 +670,10 @@ void LocalAssetBrowser::PerformTimedActions(void)
|
||||
// one of the layer bitmaps has been updated, we need to rebake.
|
||||
if ( mLayerUpdated )
|
||||
{
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
if (avatar) { avatar->forceBakeAllTextures(SLAM_FOR_DEBUG); }
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
gAgentAvatarp->forceBakeAllTextures(SLAM_FOR_DEBUG);
|
||||
}
|
||||
|
||||
mLayerUpdated = false;
|
||||
}
|
||||
|
||||
@@ -3695,12 +3695,6 @@ void LLAgent::setTeleportState(ETeleportState state)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// [RLVa:KB] - Alternate: Snowglobe-1.2.4 | Version: 1.23.4 | Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.0b
|
||||
if ( (rlv_handler_t::isEnabled()) && (TELEPORT_NONE == mTeleportState) )
|
||||
{
|
||||
gRlvHandler.setCanCancelTp(true);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
}
|
||||
|
||||
void LLAgent::stopCurrentAnimations()
|
||||
|
||||
@@ -1903,15 +1903,15 @@ void LLAgentWearables::userRemoveAllClothes()
|
||||
// We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
|
||||
if (gAgentCamera.cameraCustomizeAvatar())
|
||||
{
|
||||
gFloaterCustomize->askToSaveIfDirty( LLAgentWearables::userRemoveAllClothesStep2, NULL );
|
||||
gFloaterCustomize->askToSaveIfDirty( boost::bind(LLAgentWearables::userRemoveAllClothesStep2,_1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
userRemoveAllClothesStep2( TRUE, NULL );
|
||||
userRemoveAllClothesStep2( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
void LLAgentWearables::userRemoveAllClothesStep2( BOOL proceed, void* userdata )
|
||||
void LLAgentWearables::userRemoveAllClothesStep2( BOOL proceed )
|
||||
{
|
||||
if( proceed )
|
||||
{
|
||||
|
||||
@@ -185,7 +185,7 @@ private:
|
||||
void removeWearableFinal(const LLWearableType::EType type, bool do_remove_all /*= false*/, U32 index /*= 0*/);
|
||||
protected:
|
||||
static bool onRemoveWearableDialog(const LLSD& notification, const LLSD& response);
|
||||
static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL
|
||||
static void userRemoveAllClothesStep2(BOOL proceed); // userdata is NULL
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Server Communication
|
||||
|
||||
@@ -4639,13 +4639,9 @@ void LLAppViewer::handleLoginComplete()
|
||||
{
|
||||
gDebugInfo["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState();
|
||||
}
|
||||
writeDebugInfo();
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-09-27 (RLVa-1.1.3b) | Modified: RLVa-1.1.3b
|
||||
if (rlv_handler_t::isEnabled())
|
||||
{
|
||||
gRlvHandler.onLoginComplete();
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
mOnLoginCompleted();
|
||||
|
||||
writeDebugInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +160,11 @@ public:
|
||||
void handleLoginComplete();
|
||||
|
||||
LLAllocator & getAllocator() { return mAlloc; }
|
||||
// On LoginCompleted callback
|
||||
typedef boost::signals2::signal<void (void)> login_completed_signal_t;
|
||||
login_completed_signal_t mOnLoginCompleted;
|
||||
boost::signals2::connection setOnLoginCompletedCallback( const login_completed_signal_t::slot_type& cb ) { return mOnLoginCompleted.connect(cb); }
|
||||
|
||||
void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
|
||||
|
||||
void purgeCache(); // Clear the local cache.
|
||||
|
||||
@@ -34,19 +34,12 @@
|
||||
|
||||
#include "llassetuploadresponders.h"
|
||||
|
||||
// library includes
|
||||
#include "lleconomy.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
// viewer includes
|
||||
#include "llagent.h"
|
||||
#include "llcompilequeue.h"
|
||||
#include "llfloaterbuycurrency.h"
|
||||
#include "llnotify.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryobserver.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llpanelmaininventory.h"
|
||||
#include "llpermissionsflags.h"
|
||||
@@ -63,6 +56,18 @@
|
||||
#include "llviewermenufile.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "lltexlayer.h"
|
||||
#include "lltrans.h"
|
||||
|
||||
// library includes
|
||||
#include "lldir.h"
|
||||
#include "lleconomy.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llvfs.h"
|
||||
|
||||
#include "statemachine/aifilepicker.h"
|
||||
|
||||
// When uploading multiple files, don't display any of them when uploading more than this number.
|
||||
@@ -70,14 +75,15 @@ static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5;
|
||||
|
||||
void dialog_refresh_all();
|
||||
|
||||
void on_new_single_inventory_upload_complete(LLAssetType::EType asset_type,
|
||||
LLInventoryType::EType inventory_type,
|
||||
const std::string inventory_type_string,
|
||||
const LLUUID& item_folder_id,
|
||||
const std::string& item_name,
|
||||
const std::string& item_description,
|
||||
const LLSD& server_response,
|
||||
S32 upload_price)
|
||||
void on_new_single_inventory_upload_complete(
|
||||
LLAssetType::EType asset_type,
|
||||
LLInventoryType::EType inventory_type,
|
||||
const std::string inventory_type_string,
|
||||
const LLUUID& item_folder_id,
|
||||
const std::string& item_name,
|
||||
const std::string& item_description,
|
||||
const LLSD& server_response,
|
||||
S32 upload_price)
|
||||
{
|
||||
if (upload_price > 0)
|
||||
{
|
||||
@@ -87,7 +93,7 @@ void on_new_single_inventory_upload_complete(LLAssetType::EType asset_type,
|
||||
|
||||
LLSD args;
|
||||
args["AMOUNT"] = llformat("%d", upload_price);
|
||||
LLNotifications::instance().add("UploadPayment", args);
|
||||
LLNotificationsUtil::add("UploadPayment", args);
|
||||
}
|
||||
|
||||
if (item_folder_id.notNull())
|
||||
@@ -115,9 +121,18 @@ void on_new_single_inventory_upload_complete(LLAssetType::EType asset_type,
|
||||
}
|
||||
|
||||
LLPermissions new_perms;
|
||||
new_perms.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
|
||||
new_perms.initMasks(PERM_ALL, PERM_ALL, everyone_perms, group_perms,
|
||||
next_owner_perms);
|
||||
new_perms.init(
|
||||
gAgent.getID(),
|
||||
gAgent.getID(),
|
||||
LLUUID::null,
|
||||
LLUUID::null);
|
||||
|
||||
new_perms.initMasks(
|
||||
PERM_ALL,
|
||||
PERM_ALL,
|
||||
everyone_perms,
|
||||
group_perms,
|
||||
next_owner_perms);
|
||||
|
||||
U32 inventory_item_flags = 0;
|
||||
if (server_response.has("inventory_flags"))
|
||||
@@ -147,17 +162,18 @@ void on_new_single_inventory_upload_complete(LLAssetType::EType asset_type,
|
||||
|
||||
// Show the preview panel for textures and sounds to let
|
||||
// user know that the image (or snapshot) arrived intact.
|
||||
LLInventoryView* view = LLInventoryView::getActiveInventory();
|
||||
if (view)
|
||||
LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel();
|
||||
if ( panel )
|
||||
{
|
||||
LLFocusableElement* focus = gFocusMgr.getKeyboardFocus();
|
||||
|
||||
view->getPanel()->setSelection(server_response["new_inventory_item"].asUUID(),
|
||||
TAKE_FOCUS_NO);
|
||||
panel->setSelection(
|
||||
server_response["new_inventory_item"].asUUID(),
|
||||
TAKE_FOCUS_NO);
|
||||
if ((LLAssetType::AT_TEXTURE == asset_type || LLAssetType::AT_SOUND == asset_type)
|
||||
/* FIXME: && LLFilePicker::instance().getFileCount() <= FILE_COUNT_DISPLAY_THRESHOLD */)
|
||||
{
|
||||
view->getPanel()->openSelected();
|
||||
panel->openSelected();
|
||||
}
|
||||
|
||||
// restore keyboard focus
|
||||
@@ -190,7 +206,8 @@ LLAssetUploadResponder::LLAssetUploadResponder(const LLSD &post_data,
|
||||
}
|
||||
}
|
||||
|
||||
LLAssetUploadResponder::LLAssetUploadResponder(const LLSD &post_data,
|
||||
LLAssetUploadResponder::LLAssetUploadResponder(
|
||||
const LLSD &post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLHTTPClient::Responder(),
|
||||
@@ -221,14 +238,14 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason)
|
||||
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
|
||||
args["REASON"] = "Error in upload request. Please visit "
|
||||
"http://secondlife.com/support for help fixing this problem.";
|
||||
LLNotifications::instance().add("CannotUploadReason", args);
|
||||
LLNotificationsUtil::add("CannotUploadReason", args);
|
||||
break;
|
||||
case 500:
|
||||
default:
|
||||
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
|
||||
args["REASON"] = "The server is experiencing unexpected "
|
||||
"difficulties.";
|
||||
LLNotifications::instance().add("CannotUploadReason", args);
|
||||
LLNotificationsUtil::add("CannotUploadReason", args);
|
||||
break;
|
||||
}
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
@@ -291,7 +308,7 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content)
|
||||
LLSD args;
|
||||
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
|
||||
args["REASON"] = content["message"].asString();
|
||||
LLNotifications::instance().add("CannotUploadReason", args);
|
||||
LLNotificationsUtil::add("CannotUploadReason", args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,17 +316,19 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content)
|
||||
{
|
||||
}
|
||||
|
||||
LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, vfile_id, asset_type)
|
||||
LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(
|
||||
const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, vfile_id, asset_type)
|
||||
{
|
||||
}
|
||||
|
||||
LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, file_name, asset_type)
|
||||
LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(
|
||||
const LLSD& post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, file_name, asset_type)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -347,17 +366,21 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
|
||||
asset_type == LLAssetType::AT_ANIMATION ||
|
||||
asset_type == LLAssetType::AT_MESH)
|
||||
{
|
||||
expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
|
||||
expected_upload_cost =
|
||||
LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
|
||||
}
|
||||
|
||||
llinfos << "Adding " << content["new_inventory_item"].asUUID() << " "
|
||||
<< content["new_asset"].asUUID() << " to inventory." << llendl;
|
||||
on_new_single_inventory_upload_complete(asset_type, inventory_type,
|
||||
mPostData["asset_type"].asString(),
|
||||
mPostData["folder_id"].asUUID(),
|
||||
mPostData["name"],
|
||||
mPostData["description"],
|
||||
content, expected_upload_cost);
|
||||
on_new_single_inventory_upload_complete(
|
||||
asset_type,
|
||||
inventory_type,
|
||||
mPostData["asset_type"].asString(),
|
||||
mPostData["folder_id"].asUUID(),
|
||||
mPostData["name"],
|
||||
mPostData["description"],
|
||||
content,
|
||||
expected_upload_cost);
|
||||
|
||||
// continue uploading for bulk uploads
|
||||
|
||||
@@ -378,42 +401,54 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
|
||||
// and use them for each next file to be uploaded. Note the requested
|
||||
// perms are not the same as the granted ones found in the given
|
||||
// "content" structure but can still be found in mPostData. -MG
|
||||
U32 everyone_perms = mPostData.has("everyone_mask") ?
|
||||
mPostData.get("everyone_mask").asInteger() :
|
||||
PERM_NONE;
|
||||
U32 everyone_perms =
|
||||
mPostData.has("everyone_mask") ?
|
||||
mPostData.get("everyone_mask").asInteger() :
|
||||
PERM_NONE;
|
||||
|
||||
U32 group_perms = mPostData.has("group_mask") ?
|
||||
mPostData.get("group_mask").asInteger() :
|
||||
PERM_NONE;
|
||||
U32 group_perms =
|
||||
mPostData.has("group_mask") ?
|
||||
mPostData.get("group_mask").asInteger() :
|
||||
PERM_NONE;
|
||||
|
||||
U32 next_owner_perms = mPostData.has("next_owner_mask") ?
|
||||
mPostData.get("next_owner_mask").asInteger() :
|
||||
PERM_NONE;
|
||||
U32 next_owner_perms =
|
||||
mPostData.has("next_owner_mask") ?
|
||||
mPostData.get("next_owner_mask").asInteger() :
|
||||
PERM_NONE;
|
||||
|
||||
std::string display_name = LLStringUtil::null;
|
||||
LLAssetStorage::LLStoreAssetCallback callback = NULL;
|
||||
void *userdata = NULL;
|
||||
upload_new_resource(next_file, asset_name, asset_name, 0,
|
||||
LLFolderType::FT_NONE, LLInventoryType::IT_NONE,
|
||||
next_owner_perms, group_perms, everyone_perms,
|
||||
display_name, callback, expected_upload_cost,
|
||||
userdata);
|
||||
|
||||
upload_new_resource(
|
||||
next_file,
|
||||
asset_name,
|
||||
asset_name,
|
||||
0,
|
||||
LLFolderType::FT_NONE,
|
||||
LLInventoryType::IT_NONE,
|
||||
next_owner_perms,
|
||||
group_perms,
|
||||
everyone_perms,
|
||||
display_name,
|
||||
callback,
|
||||
expected_upload_cost,
|
||||
userdata);
|
||||
}
|
||||
}
|
||||
|
||||
LLSendTexLayerResponder::LLSendTexLayerResponder(const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
LLBakedUploadData * baked_upload_data)
|
||||
: LLAssetUploadResponder(post_data, vfile_id, asset_type),
|
||||
LLBakedUploadData * baked_upload_data) :
|
||||
LLAssetUploadResponder(post_data, vfile_id, asset_type),
|
||||
mBakedUploadData(baked_upload_data)
|
||||
{
|
||||
}
|
||||
|
||||
LLSendTexLayerResponder::~LLSendTexLayerResponder()
|
||||
{
|
||||
// mBakedUploadData is normally deleted by calls to
|
||||
// LLTexLayerSetBuffer::onTextureUploadComplete() below
|
||||
// mBakedUploadData is normally deleted by calls to LLTexLayerSetBuffer::onTextureUploadComplete() below
|
||||
if (mBakedUploadData)
|
||||
{ // ...but delete it in the case where uploadComplete() is never called
|
||||
delete mBakedUploadData;
|
||||
@@ -430,19 +465,16 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content)
|
||||
std::string result = content["state"];
|
||||
LLUUID new_id = content["new_asset"];
|
||||
|
||||
llinfos << "LLSendTexLayerResponder::result from capabilities: " << result << llendl;
|
||||
if (result == "complete" && mBakedUploadData != NULL)
|
||||
llinfos << "result: " << result << " new_id: " << new_id << llendl;
|
||||
if (result == "complete"
|
||||
&& mBakedUploadData != NULL)
|
||||
{ // Invoke
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(new_id,
|
||||
(void*)mBakedUploadData,
|
||||
0, LL_EXSTAT_NONE);
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(new_id, (void*) mBakedUploadData, 0, LL_EXSTAT_NONE);
|
||||
mBakedUploadData = NULL; // deleted in onTextureUploadComplete()
|
||||
}
|
||||
else
|
||||
{ // Invoke the original callback with an error result
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(new_id,
|
||||
(void*)mBakedUploadData,
|
||||
-1, LL_EXSTAT_NONE);
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(new_id, (void*) mBakedUploadData, -1, LL_EXSTAT_NONE);
|
||||
mBakedUploadData = NULL; // deleted in onTextureUploadComplete()
|
||||
}
|
||||
}
|
||||
@@ -452,23 +484,23 @@ void LLSendTexLayerResponder::error(U32 statusNum, const std::string& reason)
|
||||
llinfos << "status: " << statusNum << " reason: " << reason << llendl;
|
||||
|
||||
// Invoke the original callback with an error result
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(LLUUID(),
|
||||
(void*)mBakedUploadData,
|
||||
-1, LL_EXSTAT_NONE);
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(LLUUID(), (void*) mBakedUploadData, -1, LL_EXSTAT_NONE);
|
||||
mBakedUploadData = NULL; // deleted in onTextureUploadComplete()
|
||||
}
|
||||
|
||||
LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, vfile_id, asset_type)
|
||||
LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(
|
||||
const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, vfile_id, asset_type)
|
||||
{
|
||||
}
|
||||
|
||||
LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(const LLSD& post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, file_name, asset_type)
|
||||
LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(
|
||||
const LLSD& post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type)
|
||||
: LLAssetUploadResponder(post_data, file_name, asset_type)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -501,8 +533,7 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content)
|
||||
case LLInventoryType::IT_NOTECARD:
|
||||
{
|
||||
// Update the UI with the new asset.
|
||||
LLPreviewNotecard* nc;
|
||||
nc = (LLPreviewNotecard*)LLPreview::find(new_item->getUUID());
|
||||
LLPreviewNotecard* nc = (LLPreviewNotecard*)LLPreview::find(new_item->getUUID());
|
||||
if (nc)
|
||||
{
|
||||
// *HACK: we have to delete the asset in the VFS so
|
||||
@@ -511,10 +542,9 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content)
|
||||
// the uploader, so this can be optimized away in some
|
||||
// cases. A better design is to have a new uuid if the
|
||||
// script actually changed the asset.
|
||||
if (nc->hasEmbeddedInventory())
|
||||
if(nc->hasEmbeddedInventory())
|
||||
{
|
||||
gVFS->removeFile(content["new_asset"].asUUID(),
|
||||
LLAssetType::AT_NOTECARD);
|
||||
gVFS->removeFile(content["new_asset"].asUUID(), LLAssetType::AT_NOTECARD);
|
||||
}
|
||||
nc->refreshFromInventory();
|
||||
}
|
||||
@@ -538,15 +568,16 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case LLInventoryType::IT_GESTURE:
|
||||
{
|
||||
// If this gesture is active, then we need to update the in-memory
|
||||
// active map with the new pointer.
|
||||
if (LLGestureMgr::getInstance()->isGestureActive(item_id))
|
||||
{
|
||||
LLUUID asset_id = new_item->getAssetUUID();
|
||||
LLGestureMgr::getInstance()->replaceGesture(item_id, asset_id);
|
||||
gInventory.notifyObservers();
|
||||
// active map with the new pointer.
|
||||
if (LLGestureMgr::instance().isGestureActive(item_id))
|
||||
{
|
||||
LLUUID asset_id = new_item->getAssetUUID();
|
||||
LLGestureMgr::instance().replaceGesture(item_id, asset_id);
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
|
||||
//gesture will have a new asset_id
|
||||
@@ -639,9 +670,7 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
|
||||
// Bytecode save completed
|
||||
if (content["compiled"])
|
||||
{
|
||||
preview->callbackLSLCompileSucceeded(task_id,
|
||||
item_id,
|
||||
mPostData["is_script_running"]);
|
||||
preview->callbackLSLCompileSucceeded(task_id, item_id, mPostData["is_script_running"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -662,27 +691,30 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)
|
||||
class LLNewAgentInventoryVariablePriceResponder::Impl
|
||||
{
|
||||
public:
|
||||
Impl(const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_data)
|
||||
: mVFileID(vfile_id),
|
||||
Impl(
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_data) :
|
||||
mVFileID(vfile_id),
|
||||
mAssetType(asset_type),
|
||||
mInventoryData(inventory_data),
|
||||
mFileName("")
|
||||
{
|
||||
if (!gVFS->getExists(vfile_id, asset_type))
|
||||
{
|
||||
llwarns << "LLAssetUploadResponder called with nonexistant "
|
||||
<< "vfile_id " << vfile_id << llendl;
|
||||
llwarns
|
||||
<< "LLAssetUploadResponder called with nonexistant "
|
||||
<< "vfile_id " << vfile_id << llendl;
|
||||
mVFileID.setNull();
|
||||
mAssetType = LLAssetType::AT_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
Impl(const std::string& file_name,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_data)
|
||||
: mFileName(file_name),
|
||||
Impl(
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_data) :
|
||||
mFileName(file_name),
|
||||
mAssetType(asset_type),
|
||||
mInventoryData(inventory_data)
|
||||
{
|
||||
@@ -741,7 +773,8 @@ public:
|
||||
args["FILE"] = getFilenameOrIDString();
|
||||
args["REASON"] = reason;
|
||||
|
||||
LLNotifications::instance().add("CannotUploadReason", args);
|
||||
|
||||
LLNotificationsUtil::add("CannotUploadReason", args);
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
}
|
||||
|
||||
@@ -776,45 +809,55 @@ public:
|
||||
else if (_MISSING_REQUIRED_PARAMETER == error_identifier)
|
||||
{
|
||||
// Missing parameters
|
||||
if (error.has(_MISSING_PARAMETER))
|
||||
if (error.has(_MISSING_PARAMETER) )
|
||||
{
|
||||
std::string message = "Upload request was missing required parameter '[P]'";
|
||||
LLStringUtil::replaceString(message, "[P]",
|
||||
error[_MISSING_PARAMETER].asString());
|
||||
std::string message =
|
||||
"Upload request was missing required parameter '[P]'";
|
||||
LLStringUtil::replaceString(
|
||||
message,
|
||||
"[P]",
|
||||
error[_MISSING_PARAMETER].asString());
|
||||
|
||||
displayCannotUploadReason(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string message = "Upload request was missing a required parameter";
|
||||
std::string message =
|
||||
"Upload request was missing a required parameter";
|
||||
displayCannotUploadReason(message);
|
||||
}
|
||||
}
|
||||
else if (_INVALID_REQUEST_BODY == error_identifier)
|
||||
else if ( _INVALID_REQUEST_BODY == error_identifier )
|
||||
{
|
||||
// Invalid request body, check to see if
|
||||
// a particular parameter was invalid
|
||||
if (error.has(_INVALID_PARAMETER))
|
||||
if ( error.has(_INVALID_PARAMETER) )
|
||||
{
|
||||
std::string message = "Upload parameter '[P]' is invalid.";
|
||||
LLStringUtil::replaceString(message, "[P]",
|
||||
error[_INVALID_PARAMETER].asString());
|
||||
LLStringUtil::replaceString(
|
||||
message,
|
||||
"[P]",
|
||||
error[_INVALID_PARAMETER].asString());
|
||||
|
||||
// See if the server also responds with what resource
|
||||
// is missing.
|
||||
if (error.has(_MISSING_RESOURCE))
|
||||
if ( error.has(_MISSING_RESOURCE) )
|
||||
{
|
||||
message += "\nMissing resource '[R]'.";
|
||||
|
||||
LLStringUtil::replaceString(message, "[R]",
|
||||
error[_MISSING_RESOURCE].asString());
|
||||
LLStringUtil::replaceString(
|
||||
message,
|
||||
"[R]",
|
||||
error[_MISSING_RESOURCE].asString());
|
||||
}
|
||||
else if (error.has(_INVALID_RESOURCE))
|
||||
else if ( error.has(_INVALID_RESOURCE) )
|
||||
{
|
||||
message += "\nInvalid resource '[R]'.";
|
||||
|
||||
LLStringUtil::replaceString(message, "[R]",
|
||||
error[_INVALID_RESOURCE].asString());
|
||||
LLStringUtil::replaceString(
|
||||
message,
|
||||
"[R]",
|
||||
error[_INVALID_RESOURCE].asString());
|
||||
}
|
||||
|
||||
displayCannotUploadReason(message);
|
||||
@@ -837,7 +880,8 @@ public:
|
||||
|
||||
void onTransportError()
|
||||
{
|
||||
displayCannotUploadReason("The server is experiencing unexpected difficulties.");
|
||||
displayCannotUploadReason(
|
||||
"The server is experiencing unexpected difficulties.");
|
||||
}
|
||||
|
||||
void onTransportError(const LLSD& error)
|
||||
@@ -852,47 +896,72 @@ public:
|
||||
// TODO*: Pull the user visible strings from an xml file
|
||||
// to be localized
|
||||
|
||||
if (_SERVER_ERROR_AFTER_CHARGE == error_identifier)
|
||||
if ( _SERVER_ERROR_AFTER_CHARGE == error_identifier )
|
||||
{
|
||||
displayCannotUploadReason("The server is experiencing unexpected difficulties. You may have been charged for the upload.");
|
||||
displayCannotUploadReason(
|
||||
"The server is experiencing unexpected difficulties. You may have been charged for the upload.");
|
||||
}
|
||||
else
|
||||
{
|
||||
displayCannotUploadReason("The server is experiencing unexpected difficulties.");
|
||||
displayCannotUploadReason(
|
||||
"The server is experiencing unexpected difficulties.");
|
||||
}
|
||||
}
|
||||
|
||||
bool uploadConfirmationCallback(const LLSD& notification,
|
||||
const LLSD& response,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
|
||||
bool uploadConfirmationCallback(
|
||||
const LLSD& notification,
|
||||
const LLSD& response,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
std::string confirmation_url = notification["payload"]["confirmation_url"].asString();
|
||||
S32 option;
|
||||
std::string confirmation_url;
|
||||
|
||||
option = LLNotificationsUtil::getSelectedOption(
|
||||
notification,
|
||||
response);
|
||||
|
||||
confirmation_url =
|
||||
notification["payload"]["confirmation_url"].asString();
|
||||
|
||||
// Yay! We are confirming or cancelling our upload
|
||||
if (option == 0)
|
||||
switch(option)
|
||||
{
|
||||
confirmUpload(confirmation_url, responder);
|
||||
case 0:
|
||||
{
|
||||
confirmUpload(confirmation_url, responder);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void confirmUpload(const std::string& confirmation_url,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
|
||||
void confirmUpload(
|
||||
const std::string& confirmation_url,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder)
|
||||
{
|
||||
if (getFilename().empty())
|
||||
if ( getFilename().empty() )
|
||||
{
|
||||
// we have no filename, use virtual file ID instead
|
||||
LLHTTPClient::postFile(confirmation_url, getVFileID(),
|
||||
getAssetType(), responder);
|
||||
LLHTTPClient::postFile(
|
||||
confirmation_url,
|
||||
getVFileID(),
|
||||
getAssetType(),
|
||||
responder);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLHTTPClient::postFile(confirmation_url, getFilename(), responder);
|
||||
LLHTTPClient::postFile(
|
||||
confirmation_url,
|
||||
getFilename(),
|
||||
responder);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::string mFileName;
|
||||
|
||||
@@ -904,18 +973,26 @@ private:
|
||||
///////////////////////////////////////////////
|
||||
// LLNewAgentInventoryVariablePriceResponder //
|
||||
///////////////////////////////////////////////
|
||||
LLNewAgentInventoryVariablePriceResponder::LLNewAgentInventoryVariablePriceResponder(const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info)
|
||||
LLNewAgentInventoryVariablePriceResponder::LLNewAgentInventoryVariablePriceResponder(
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info)
|
||||
{
|
||||
mImpl = new Impl(vfile_id, asset_type, inventory_info);
|
||||
mImpl = new Impl(
|
||||
vfile_id,
|
||||
asset_type,
|
||||
inventory_info);
|
||||
}
|
||||
|
||||
LLNewAgentInventoryVariablePriceResponder::LLNewAgentInventoryVariablePriceResponder(const std::string& file_name,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info)
|
||||
LLNewAgentInventoryVariablePriceResponder::LLNewAgentInventoryVariablePriceResponder(
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info)
|
||||
{
|
||||
mImpl = new Impl(file_name, asset_type, inventory_info);
|
||||
mImpl = new Impl(
|
||||
file_name,
|
||||
asset_type,
|
||||
inventory_info);
|
||||
}
|
||||
|
||||
LLNewAgentInventoryVariablePriceResponder::~LLNewAgentInventoryVariablePriceResponder()
|
||||
@@ -923,16 +1000,19 @@ LLNewAgentInventoryVariablePriceResponder::~LLNewAgentInventoryVariablePriceResp
|
||||
delete mImpl;
|
||||
}
|
||||
|
||||
void LLNewAgentInventoryVariablePriceResponder::errorWithContent(U32 statusNum,
|
||||
const std::string& reason,
|
||||
const LLSD& content)
|
||||
void LLNewAgentInventoryVariablePriceResponder::errorWithContent(
|
||||
U32 statusNum,
|
||||
const std::string& reason,
|
||||
const LLSD& content)
|
||||
{
|
||||
LL_DEBUGS("Upload") << "LLNewAgentInventoryVariablePrice::error "
|
||||
<< statusNum << " reason: " << reason << LL_ENDL;
|
||||
lldebugs
|
||||
<< "LLNewAgentInventoryVariablePrice::error " << statusNum
|
||||
<< " reason: " << reason << llendl;
|
||||
|
||||
if (content.has("error"))
|
||||
if ( content.has("error") )
|
||||
{
|
||||
static const std::string _ERROR = "error";
|
||||
|
||||
mImpl->onTransportError(content[_ERROR]);
|
||||
}
|
||||
else
|
||||
@@ -972,27 +1052,32 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
|
||||
{
|
||||
// rename the file in the VFS to the actual asset id
|
||||
// llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl;
|
||||
gVFS->renameFile(mImpl->getVFileID(), asset_type,
|
||||
content["new_asset"].asUUID(), asset_type);
|
||||
gVFS->renameFile(
|
||||
mImpl->getVFileID(),
|
||||
asset_type,
|
||||
content["new_asset"].asUUID(),
|
||||
asset_type);
|
||||
}
|
||||
|
||||
on_new_single_inventory_upload_complete(asset_type,
|
||||
mImpl->getInventoryType(),
|
||||
mImpl->getInventoryTypeString(),
|
||||
mImpl->getFolderID(),
|
||||
mImpl->getItemName(),
|
||||
mImpl->getItemDescription(),
|
||||
content,
|
||||
content[_UPLOAD_PRICE].asInteger());
|
||||
on_new_single_inventory_upload_complete(
|
||||
asset_type,
|
||||
mImpl->getInventoryType(),
|
||||
mImpl->getInventoryTypeString(),
|
||||
mImpl->getFolderID(),
|
||||
mImpl->getItemName(),
|
||||
mImpl->getItemDescription(),
|
||||
content,
|
||||
content[_UPLOAD_PRICE].asInteger());
|
||||
|
||||
// TODO* Add bulk (serial) uploading or add
|
||||
// a super class of this that does so
|
||||
}
|
||||
else if (_CONFIRM_UPLOAD == state)
|
||||
else if ( _CONFIRM_UPLOAD == state )
|
||||
{
|
||||
showConfirmationDialog(content[_UPLOAD_PRICE].asInteger(),
|
||||
content[_RESOURCE_COST].asInteger(),
|
||||
content[_RSVP].asString());
|
||||
showConfirmationDialog(
|
||||
content[_UPLOAD_PRICE].asInteger(),
|
||||
content[_RESOURCE_COST].asInteger(),
|
||||
content[_RSVP].asString());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1000,14 +1085,16 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
|
||||
}
|
||||
}
|
||||
|
||||
void LLNewAgentInventoryVariablePriceResponder::onApplicationLevelError(const LLSD& error)
|
||||
void LLNewAgentInventoryVariablePriceResponder::onApplicationLevelError(
|
||||
const LLSD& error)
|
||||
{
|
||||
mImpl->onApplicationLevelError(error);
|
||||
}
|
||||
|
||||
void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(S32 upload_price,
|
||||
S32 resource_cost,
|
||||
const std::string& confirmation_url)
|
||||
void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(
|
||||
S32 upload_price,
|
||||
S32 resource_cost,
|
||||
const std::string& confirmation_url)
|
||||
{
|
||||
if (0 == upload_price)
|
||||
{
|
||||
@@ -1027,8 +1114,9 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(S32 uploa
|
||||
// when using plain ol' 'this', that this object
|
||||
// would be deleted before the callback is triggered
|
||||
// and cause sadness.
|
||||
mImpl->confirmUpload(confirmation_url,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this));
|
||||
mImpl->confirmUpload(
|
||||
confirmation_url,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1052,10 +1140,15 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(S32 uploa
|
||||
// when using plain ol' 'this', that this object
|
||||
// would be deleted before the callback is triggered
|
||||
// and cause sadness.
|
||||
LLNotifications::instance().add("UploadCostConfirmation",
|
||||
substitutions, payload,
|
||||
boost::bind(&LLNewAgentInventoryVariablePriceResponder::Impl::uploadConfirmationCallback,
|
||||
mImpl, _1, _2,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this)));
|
||||
LLNotificationsUtil::add(
|
||||
"UploadCostConfirmation",
|
||||
substitutions,
|
||||
payload,
|
||||
boost::bind(
|
||||
&LLNewAgentInventoryVariablePriceResponder::Impl::uploadConfirmationCallback,
|
||||
mImpl,
|
||||
_1,
|
||||
_2,
|
||||
boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,12 +73,14 @@ protected:
|
||||
class LLNewAgentInventoryResponder : public LLAssetUploadResponder
|
||||
{
|
||||
public:
|
||||
LLNewAgentInventoryResponder(const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type);
|
||||
LLNewAgentInventoryResponder(const LLSD& post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type);
|
||||
LLNewAgentInventoryResponder(
|
||||
const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type);
|
||||
LLNewAgentInventoryResponder(
|
||||
const LLSD& post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type);
|
||||
virtual void error(U32 statusNum, const std::string& reason);
|
||||
virtual void uploadComplete(const LLSD& content);
|
||||
virtual void uploadFailure(const LLSD& content);
|
||||
@@ -92,23 +94,28 @@ class LLNewAgentInventoryVariablePriceResponder :
|
||||
public LLHTTPClient::Responder
|
||||
{
|
||||
public:
|
||||
LLNewAgentInventoryVariablePriceResponder(const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info);
|
||||
LLNewAgentInventoryVariablePriceResponder(
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info);
|
||||
|
||||
LLNewAgentInventoryVariablePriceResponder(const std::string& file_name,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info);
|
||||
LLNewAgentInventoryVariablePriceResponder(
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type,
|
||||
const LLSD& inventory_info);
|
||||
virtual ~LLNewAgentInventoryVariablePriceResponder();
|
||||
|
||||
void errorWithContent(U32 statusNum,
|
||||
const std::string& reason,
|
||||
const LLSD& content);
|
||||
void errorWithContent(
|
||||
U32 statusNum,
|
||||
const std::string& reason,
|
||||
const LLSD& content);
|
||||
void result(const LLSD& content);
|
||||
|
||||
virtual void onApplicationLevelError(const LLSD& error);
|
||||
virtual void showConfirmationDialog(S32 upload_price,
|
||||
S32 resource_cost,
|
||||
virtual void onApplicationLevelError(
|
||||
const LLSD& error);
|
||||
virtual void showConfirmationDialog(
|
||||
S32 upload_price,
|
||||
S32 resource_cost,
|
||||
const std::string& confirmation_url);
|
||||
|
||||
private:
|
||||
|
||||
@@ -131,9 +131,6 @@ void LLAvatarPropertiesProcessor::sendAvatarPropertiesRequest(const LLUUID& avat
|
||||
|
||||
void LLAvatarPropertiesProcessor::sendAvatarPicksRequest(const LLUUID& avatar_id)
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(avatar_id, name);
|
||||
llinfos << "Sending avatarpicksrequest for " << avatar_id << " ("<<name<<")" << llendl;
|
||||
sendGenericRequest(avatar_id, APT_PICKS, "avatarpicksrequest");
|
||||
}
|
||||
|
||||
@@ -398,10 +395,6 @@ void LLAvatarPropertiesProcessor::processAvatarPicksReply(LLMessageSystem* msg,
|
||||
msg->getUUID(_PREHASH_AgentData, _PREHASH_AgentID, avatar_picks.agent_id);
|
||||
msg->getUUID(_PREHASH_AgentData, _PREHASH_TargetID, avatar_picks.target_id);
|
||||
|
||||
std::string name;
|
||||
gCacheName->getFullName(avatar_picks.target_id, name);
|
||||
|
||||
llinfos << "Got reply for " << avatar_picks.target_id << ": (" << name << ")" << llendl;
|
||||
S32 block_count = msg->getNumberOfBlocks(_PREHASH_Data);
|
||||
for (int block = 0; block < block_count; ++block)
|
||||
{
|
||||
@@ -411,14 +404,12 @@ void LLAvatarPropertiesProcessor::processAvatarPicksReply(LLMessageSystem* msg,
|
||||
msg->getUUID(_PREHASH_Data, _PREHASH_PickID, pick_id, block);
|
||||
msg->getString(_PREHASH_Data, _PREHASH_PickName, pick_name, block);
|
||||
|
||||
llinfos << "\t" << pick_id << ": " << pick_name << llendl;
|
||||
avatar_picks.picks_list.push_back(std::make_pair(pick_id,pick_name));
|
||||
}
|
||||
LLAvatarPropertiesProcessor* self = getInstance();
|
||||
// Request processed, no longer pending
|
||||
self->removePendingRequest(avatar_picks.target_id, APT_PICKS);
|
||||
self->notifyObservers(avatar_picks.target_id,&avatar_picks,APT_PICKS);
|
||||
//LLPanelAvatar
|
||||
}
|
||||
|
||||
void LLAvatarPropertiesProcessor::processPickInfoReply(LLMessageSystem* msg, void**)
|
||||
|
||||
@@ -180,6 +180,12 @@ private:
|
||||
bool_func_t mCallable;
|
||||
};
|
||||
|
||||
void doOnIdleRepeating(bool_func_t callable)
|
||||
{
|
||||
OnIdleCallbackRepeating* cb_functor = new OnIdleCallbackRepeating(callable);
|
||||
gIdleCallbacks.addFunction(&OnIdleCallbackRepeating::onIdle,cb_functor);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
void test1(void *data)
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file lldriverparam.cpp
|
||||
* @brief A visual parameter that drives (controls) other visual parameters.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -36,6 +30,10 @@
|
||||
|
||||
#include "llfasttimer.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llagent.h"
|
||||
#include "llwearable.h"
|
||||
#include "llagentwearables.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLDriverParamInfo
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file lldriverparam.h
|
||||
* @brief A visual parameter that drives (controls) other visual parameters.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -34,9 +28,11 @@
|
||||
#define LL_LLDRIVERPARAM_H
|
||||
|
||||
#include "llviewervisualparam.h"
|
||||
#include "llwearabletype.h"
|
||||
|
||||
class LLPhysicsMotion;
|
||||
class LLVOAvatar;
|
||||
class LLWearable;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -215,54 +215,31 @@ BOOL LLAvatarListEntry::isDead()
|
||||
return getEntryAgeSeconds() > DEAD_KEEP_TIME;
|
||||
}
|
||||
|
||||
LLFloaterAvatarList* LLFloaterAvatarList::sInstance = NULL;
|
||||
|
||||
LLFloaterAvatarList::LLFloaterAvatarList() : LLFloater(std::string("radar"))
|
||||
{
|
||||
llassert_always(sInstance == NULL);
|
||||
sInstance = this;
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_radar.xml");
|
||||
mUpdateRate = gSavedSettings.getU32("RadarUpdateRate") * 3 + 3;
|
||||
}
|
||||
|
||||
LLFloaterAvatarList::~LLFloaterAvatarList()
|
||||
{
|
||||
gIdleCallbacks.deleteFunction(LLFloaterAvatarList::callbackIdle);
|
||||
sInstance = NULL;
|
||||
}
|
||||
//static
|
||||
void LLFloaterAvatarList::createInstance(bool visible)
|
||||
{
|
||||
sInstance = new LLFloaterAvatarList();
|
||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml");
|
||||
if(!visible)
|
||||
{
|
||||
sInstance->setVisible(FALSE);
|
||||
gSavedSettings.setBOOL("ShowRadar", FALSE);
|
||||
}
|
||||
}
|
||||
//static
|
||||
void LLFloaterAvatarList::toggle(void*)
|
||||
{
|
||||
if (sInstance)
|
||||
{
|
||||
if (sInstance->getVisible()
|
||||
// [RLVa:KB]
|
||||
|| gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)
|
||||
// [/RLVa:KB]
|
||||
)
|
||||
|
||||
{
|
||||
sInstance->close(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
sInstance->open();
|
||||
}
|
||||
if(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
if(instanceExists())
|
||||
getInstance()->close();
|
||||
}
|
||||
else
|
||||
{
|
||||
// [/RLVa:KB]
|
||||
if(!instanceExists() || !getInstance()->getVisible())
|
||||
showInstance();
|
||||
}
|
||||
else
|
||||
getInstance()->close();
|
||||
}
|
||||
|
||||
//static
|
||||
@@ -272,17 +249,7 @@ void LLFloaterAvatarList::showInstance()
|
||||
if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
return;
|
||||
// [/RLVa:KB]
|
||||
if (sInstance)
|
||||
{
|
||||
if (!sInstance->getVisible())
|
||||
{
|
||||
sInstance->open();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
createInstance(true);
|
||||
}
|
||||
getInstance()->open();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarList::draw()
|
||||
@@ -293,12 +260,11 @@ void LLFloaterAvatarList::draw()
|
||||
void LLFloaterAvatarList::onOpen()
|
||||
{
|
||||
gSavedSettings.setBOOL("ShowRadar", TRUE);
|
||||
sInstance->setVisible(TRUE);
|
||||
}
|
||||
|
||||
void LLFloaterAvatarList::onClose(bool app_quitting)
|
||||
{
|
||||
sInstance->setVisible(FALSE);
|
||||
setVisible(FALSE);
|
||||
if (!app_quitting)
|
||||
{
|
||||
gSavedSettings.setBOOL("ShowRadar", FALSE);
|
||||
@@ -361,8 +327,6 @@ BOOL LLFloaterAvatarList::postBuild()
|
||||
|
||||
void LLFloaterAvatarList::updateAvatarList()
|
||||
{
|
||||
if (sInstance != this) return;
|
||||
|
||||
//llinfos << "radar refresh: updating map" << llendl;
|
||||
|
||||
// Check whether updates are enabled
|
||||
@@ -602,7 +566,7 @@ void LLFloaterAvatarList::expireAvatarList()
|
||||
void LLFloaterAvatarList::refreshAvatarList()
|
||||
{
|
||||
// Don't update list when interface is hidden
|
||||
if (!sInstance->getVisible()) return;
|
||||
if (!getVisible()) return;
|
||||
|
||||
// We rebuild the list fully each time it's refreshed
|
||||
// The assumption is that it's faster to refill it and sort than
|
||||
@@ -1441,15 +1405,13 @@ void LLFloaterAvatarList::callbackFreeze(const LLSD& notification, const LLSD& r
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
LLFloaterAvatarList *self = LLFloaterAvatarList::sInstance;
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
self->doCommand(cmd_freeze);
|
||||
getInstance()->doCommand( cmd_freeze );
|
||||
}
|
||||
else if (option == 1)
|
||||
{
|
||||
self->doCommand(cmd_unfreeze);
|
||||
getInstance()->doCommand( cmd_unfreeze );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1458,15 +1420,13 @@ void LLFloaterAvatarList::callbackEject(const LLSD& notification, const LLSD& re
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
LLFloaterAvatarList *self = LLFloaterAvatarList::sInstance;
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
self->doCommand(cmd_eject);
|
||||
getInstance()->doCommand( cmd_eject );
|
||||
}
|
||||
else if (option == 1)
|
||||
{
|
||||
self->doCommand(cmd_ban);
|
||||
getInstance()->doCommand( cmd_ban );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1475,22 +1435,21 @@ void LLFloaterAvatarList::callbackEjectFromEstate(const LLSD& notification, cons
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
|
||||
LLFloaterAvatarList *self = LLFloaterAvatarList::sInstance;
|
||||
|
||||
if (option == 0)
|
||||
{
|
||||
self->doCommand(cmd_estate_eject);
|
||||
getInstance()->doCommand( cmd_estate_eject );
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterAvatarList::callbackIdle(void *userdata) {
|
||||
if (LLFloaterAvatarList::sInstance != NULL)
|
||||
void LLFloaterAvatarList::callbackIdle(void *userdata)
|
||||
{
|
||||
if (instanceExists())
|
||||
{
|
||||
// Do not update at every frame: this would be insane !
|
||||
if (gFrameCount % LLFloaterAvatarList::sInstance->mUpdateRate == 0)
|
||||
if (gFrameCount % getInstance()->mUpdateRate == 0)
|
||||
{
|
||||
LLFloaterAvatarList::sInstance->updateAvatarList();
|
||||
getInstance()->updateAvatarList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,12 +135,13 @@ private:
|
||||
* Since I'm very new to C++ any suggestions on coding, style, etc are very
|
||||
* welcome.
|
||||
*/
|
||||
class LLFloaterAvatarList : public LLFloater
|
||||
class LLFloaterAvatarList : public LLFloater, public LLSingleton<LLFloaterAvatarList>
|
||||
{
|
||||
/**
|
||||
* @brief Creates and initializes the LLFloaterAvatarList
|
||||
* Here the interface is created, and callbacks are initialized.
|
||||
*/
|
||||
friend class LLSingleton<LLFloaterAvatarList>;
|
||||
private:
|
||||
LLFloaterAvatarList();
|
||||
public:
|
||||
@@ -187,11 +188,6 @@ public:
|
||||
static void sound_trigger_hook(LLMessageSystem* msg,void **);
|
||||
static void sendKeys();
|
||||
|
||||
private:
|
||||
static LLFloaterAvatarList* sInstance;
|
||||
|
||||
public:
|
||||
static LLFloaterAvatarList* getInstance() { return sInstance; }
|
||||
private:
|
||||
// when a line editor loses keyboard focus, it is committed.
|
||||
// commit callbacks are named onCommitWidgetName by convention.
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llappearancemgr.h"
|
||||
#include "llimagejpeg.h"
|
||||
#include "llfloatercustomize.h"
|
||||
#include "llfontgl.h"
|
||||
@@ -814,23 +815,22 @@ void LLPanelEditWearable::onColorCommit( LLUICtrl* ctrl, void* userdata )
|
||||
LLPanelEditWearable* self = (LLPanelEditWearable*) userdata;
|
||||
LLColorSwatchCtrl* color_ctrl = (LLColorSwatchCtrl*) ctrl;
|
||||
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
if( self && color_ctrl && avatar )
|
||||
if( self && color_ctrl && gAgentAvatarp )
|
||||
{
|
||||
std::map<std::string, S32>::const_iterator cl_itr = self->mColorList.find(ctrl->getName());
|
||||
if(cl_itr != self->mColorList.end())
|
||||
{
|
||||
ETextureIndex te = (ETextureIndex)cl_itr->second;
|
||||
|
||||
LLColor4 old_color = avatar->getClothesColor( te );
|
||||
LLColor4 old_color = gAgentAvatarp->getClothesColor( te );
|
||||
const LLColor4& new_color = color_ctrl->get();
|
||||
if( old_color != new_color )
|
||||
{
|
||||
// Set the new version
|
||||
avatar->setClothesColor( te, new_color, TRUE );
|
||||
gAgentAvatarp->setClothesColor( te, new_color, TRUE );
|
||||
|
||||
LLVisualParamHint::requestHintUpdates();
|
||||
avatar->wearableUpdated(self->mType, FALSE);
|
||||
gAgentAvatarp->wearableUpdated(self->mType, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1736,9 +1736,7 @@ struct WearablePanelData
|
||||
LLFloaterCustomize::LLFloaterCustomize()
|
||||
: LLFloater(std::string("customize")),
|
||||
mScrollingPanelList( NULL ),
|
||||
mInventoryObserver(NULL),
|
||||
mNextStepAfterSaveCallback( NULL ),
|
||||
mNextStepAfterSaveUserdata( NULL )
|
||||
mInventoryObserver(NULL)
|
||||
{
|
||||
memset(&mWearablePanelList[0],0,sizeof(char*)*LLWearableType::WT_COUNT); //Initialize to 0
|
||||
|
||||
@@ -1990,12 +1988,11 @@ void LLFloaterCustomize::onBtnOk( void* userdata )
|
||||
LLFloaterCustomize* floater = (LLFloaterCustomize*) userdata;
|
||||
gAgentWearables.saveAllWearables();
|
||||
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
if ( avatar )
|
||||
if ( gAgentAvatarp )
|
||||
{
|
||||
avatar->invalidateAll();
|
||||
gAgentAvatarp->invalidateAll();
|
||||
|
||||
avatar->requestLayerSetUploads();
|
||||
gAgentAvatarp->requestLayerSetUploads();
|
||||
|
||||
gAgent.sendAgentSetAppearance();
|
||||
}
|
||||
@@ -2602,11 +2599,11 @@ void LLFloaterCustomize::onTabPrecommit( void* userdata, bool from_click )
|
||||
LLWearableType::EType type = (LLWearableType::EType)(intptr_t) userdata;
|
||||
if (type != LLWearableType::WT_INVALID && gFloaterCustomize && gFloaterCustomize->getCurrentWearableType() != type)
|
||||
{
|
||||
gFloaterCustomize->askToSaveIfDirty(onCommitChangeTab, userdata);
|
||||
gFloaterCustomize->askToSaveIfDirty(boost::bind(&onCommitChangeTab, _1));
|
||||
}
|
||||
else
|
||||
{
|
||||
onCommitChangeTab(TRUE, NULL);
|
||||
onCommitChangeTab(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2629,7 +2626,7 @@ void LLFloaterCustomize::onClose(bool app_quitting)
|
||||
}
|
||||
|
||||
// static
|
||||
void LLFloaterCustomize::onCommitChangeTab(BOOL proceed, void* userdata)
|
||||
void LLFloaterCustomize::onCommitChangeTab(BOOL proceed)
|
||||
{
|
||||
if (!proceed || !gFloaterCustomize)
|
||||
{
|
||||
@@ -2716,24 +2713,20 @@ void LLFloaterCustomize::updateScrollingPanelList(BOOL allow_modify)
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterCustomize::askToSaveIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata )
|
||||
void LLFloaterCustomize::askToSaveIfDirty( boost::function<void (BOOL)> cb )
|
||||
{
|
||||
if( isDirty())
|
||||
{
|
||||
// Ask if user wants to save, then continue to next step afterwards
|
||||
mNextStepAfterSaveCallback = next_step_callback;
|
||||
mNextStepAfterSaveUserdata = userdata;
|
||||
mNextStepAfterSaveCallback.connect(cb);
|
||||
|
||||
// Bring up view-modal dialog: Save changes? Yes, No, Cancel
|
||||
LLNotificationsUtil::add("SaveClothingBodyChanges", LLSD(), LLSD(),
|
||||
boost::bind(&LLFloaterCustomize::onSaveDialog, this, _1, _2));
|
||||
return;
|
||||
}
|
||||
|
||||
// Try to move to the next step
|
||||
if( next_step_callback )
|
||||
else
|
||||
{
|
||||
next_step_callback( TRUE, userdata );
|
||||
cb(TRUE); //just clal it immediately.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2767,10 +2760,9 @@ bool LLFloaterCustomize::onSaveDialog(const LLSD& notification, const LLSD& resp
|
||||
break;
|
||||
}
|
||||
|
||||
if( mNextStepAfterSaveCallback )
|
||||
{
|
||||
mNextStepAfterSaveCallback( proceed, mNextStepAfterSaveUserdata );
|
||||
}
|
||||
mNextStepAfterSaveCallback(proceed);
|
||||
mNextStepAfterSaveCallback.disconnect_all_slots(); //Should this be done?
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
|
||||
virtual BOOL isDirty() const;
|
||||
|
||||
void askToSaveIfDirty( void(*next_step_callback)(BOOL proceed, void* userdata), void* userdata );
|
||||
void askToSaveIfDirty( boost::function<void (BOOL)> cb );
|
||||
|
||||
void switchToDefaultSubpart();
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
static void onTabChanged( void* userdata, bool from_click );
|
||||
static void onTabPrecommit( void* userdata, bool from_click );
|
||||
bool onSaveDialog(const LLSD& notification, const LLSD& response);
|
||||
static void onCommitChangeTab(BOOL proceed, void* userdata);
|
||||
static void onCommitChangeTab(BOOL proceed);
|
||||
|
||||
void fetchInventory();
|
||||
void updateInventoryUI();
|
||||
@@ -135,10 +135,8 @@ protected:
|
||||
|
||||
LLInventoryObserver* mInventoryObserver;
|
||||
|
||||
void (*mNextStepAfterSaveCallback)(BOOL proceed, void* userdata);
|
||||
void* mNextStepAfterSaveUserdata;
|
||||
|
||||
|
||||
boost::signals2::signal<void (bool proceed)> mNextStepAfterSaveCallback;
|
||||
|
||||
protected:
|
||||
|
||||
static void* createWearablePanel(void* userdata);
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "lluiconstants.h"
|
||||
#include "llviewerobject.h"
|
||||
@@ -211,11 +211,10 @@ void LLFloaterOpenObject::callbackMoveInventory(S32 result, void* data)
|
||||
|
||||
if (result == 0)
|
||||
{
|
||||
LLInventoryView::showAgentInventory();
|
||||
LLInventoryView* view = LLInventoryView::getActiveInventory();
|
||||
if (view)
|
||||
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
|
||||
if (active_panel)
|
||||
{
|
||||
view->getPanel()->setSelection(cat->mCatID, TAKE_FOCUS_NO);
|
||||
active_panel->setSelection(cat->mCatID, TAKE_FOCUS_NO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,6 +242,6 @@ void LLFloaterOpenObject::onClickMoveAndWear(void* data)
|
||||
void* LLFloaterOpenObject::createPanelInventory(void* data)
|
||||
{
|
||||
LLFloaterOpenObject* floater = (LLFloaterOpenObject*)data;
|
||||
floater->mPanelInventory = new LLPanelInventory(std::string("Object Contents"), LLRect());
|
||||
floater->mPanelInventory = new LLPanelObjectInventory(std::string("Object Contents"), LLRect());
|
||||
return floater->mPanelInventory;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "llfloater.h"
|
||||
|
||||
class LLObjectSelection;
|
||||
class LLPanelInventory;
|
||||
class LLPanelObjectInventory;
|
||||
|
||||
class LLFloaterOpenObject
|
||||
: public LLFloater
|
||||
@@ -84,7 +84,7 @@ protected:
|
||||
protected:
|
||||
static LLFloaterOpenObject* sInstance;
|
||||
|
||||
LLPanelInventory* mPanelInventory;
|
||||
LLPanelObjectInventory* mPanelInventory;
|
||||
LLSafeHandle<LLObjectSelection> mObjectSelection;
|
||||
BOOL mDirty;
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
#include "llpanelcontents.h"
|
||||
#include "llpanelface.h"
|
||||
#include "llpanelland.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llpanelobject.h"
|
||||
#include "llpanelvolume.h"
|
||||
#include "llpanelpermissions.h"
|
||||
@@ -168,7 +168,7 @@ void* LLFloaterTools::createPanelContents(void* data)
|
||||
void* LLFloaterTools::createPanelContentsInventory(void* data)
|
||||
{
|
||||
LLFloaterTools* floater = (LLFloaterTools*)data;
|
||||
floater->mPanelContents->mPanelInventory = new LLPanelInventory(std::string("ContentsInventory"), LLRect());
|
||||
floater->mPanelContents->mPanelInventory = new LLPanelObjectInventory(std::string("ContentsInventory"), LLRect());
|
||||
return floater->mPanelContents->mPanelInventory;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,25 +93,28 @@ LLFolderViewItem::LLFolderViewItem( const std::string& name, LLUIImagePtr icon,
|
||||
LLFolderView* root,
|
||||
LLFolderViewEventListener* listener ) :
|
||||
LLUICtrl( name, LLRect(0, 0, 0, 0), TRUE, NULL, NULL, FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT),
|
||||
mLabel( name ),
|
||||
mLabelWidth(0),
|
||||
mCreationDate(creation_date),
|
||||
|
||||
mParentFolder( NULL ),
|
||||
mListener( listener ),
|
||||
mIsSelected( FALSE ),
|
||||
mIsCurSelection( FALSE ),
|
||||
mSelectPending(FALSE),
|
||||
mLabelStyle( LLFontGL::NORMAL ),
|
||||
mIcon(icon),
|
||||
|
||||
mHasVisibleChildren(FALSE),
|
||||
mIndentation(0),
|
||||
mPassedFilter(FALSE),
|
||||
mLastFilterGeneration(-1),
|
||||
mStringMatchOffset(std::string::npos),
|
||||
mControlLabelRotation(0.f),
|
||||
mRoot( root ),
|
||||
|
||||
mDragAndDropTarget(FALSE),
|
||||
mIsLoading(FALSE)
|
||||
mIsLoading(FALSE),
|
||||
mLabel( name ),
|
||||
mRoot( root ),
|
||||
mCreationDate(creation_date),
|
||||
mIcon(icon),
|
||||
mListener(listener)
|
||||
{
|
||||
sFolderViewItems.insert(this);
|
||||
refresh(); // possible opt: only call refreshFromListener()
|
||||
|
||||
@@ -335,7 +335,7 @@ protected:
|
||||
LLFolderViewEventListener* listener );
|
||||
|
||||
friend class LLBuildNewViewsScheduler;
|
||||
friend class LLPanelInventory;
|
||||
friend class LLPanelObjectInventory;
|
||||
friend class LLInventoryPanel;
|
||||
|
||||
public:
|
||||
@@ -495,8 +495,9 @@ public:
|
||||
void applyFunctorRecursively(LLFolderViewFunctor& functor);
|
||||
virtual void applyListenerFunctorRecursively(LLFolderViewListenerFunctor& functor);
|
||||
|
||||
|
||||
virtual void openItem( void );
|
||||
virtual BOOL addItem(LLFolderViewItem* item);
|
||||
virtual BOOL addItem(LLFolderViewItem* item);
|
||||
virtual BOOL addFolder( LLFolderViewFolder* folder);
|
||||
|
||||
// LLView functionality
|
||||
@@ -505,10 +506,10 @@ public:
|
||||
virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
EDragAndDropType cargo_type,
|
||||
void* cargo_data,
|
||||
EAcceptance* accept,
|
||||
std::string& tooltip_msg);
|
||||
virtual void draw();
|
||||
|
||||
time_t getCreationDate() const;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <utility> // for std::pair<>
|
||||
|
||||
#include "llinventorypanel.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llinventorybridge.h"
|
||||
|
||||
#include "message.h"
|
||||
@@ -103,7 +103,7 @@ const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not
|
||||
const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not)
|
||||
const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not)
|
||||
|
||||
typedef LLMemberListener<LLPanelInventory> object_inventory_listener_t;
|
||||
typedef LLMemberListener<LLPanelObjectInventory> object_inventory_listener_t;
|
||||
typedef LLMemberListener<LLInventoryView> inventory_listener_t;
|
||||
typedef LLMemberListener<LLInventoryPanel> inventory_panel_listener_t;
|
||||
|
||||
@@ -190,7 +190,7 @@ class LLDoToSelectedPanel : public object_inventory_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
std::string action = userdata.asString();
|
||||
LLPanelInventory *panel = mPtr;
|
||||
LLPanelObjectInventory *panel = mPtr;
|
||||
LLFolderView* folder = panel->getRootFolder();
|
||||
if(!folder) return true;
|
||||
|
||||
@@ -707,7 +707,7 @@ class LL : public listener_t
|
||||
};
|
||||
*/
|
||||
|
||||
void init_object_inventory_panel_actions(LLPanelInventory *panel)
|
||||
void init_object_inventory_panel_actions(LLPanelObjectInventory *panel)
|
||||
{
|
||||
(new LLDoToSelectedPanel())->registerListener(panel, "Inventory.DoToSelected");
|
||||
}
|
||||
|
||||
@@ -156,9 +156,17 @@ void dec_busy_count()
|
||||
}
|
||||
|
||||
// Function declarations
|
||||
|
||||
struct LLWearInfo
|
||||
{
|
||||
LLUUID mCategoryID;
|
||||
BOOL mAppend;
|
||||
BOOL mReplace;
|
||||
};
|
||||
|
||||
struct LLWearableHoldingPattern;
|
||||
void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL append, BOOL replace = FALSE);
|
||||
void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata);
|
||||
void wear_inventory_category_on_avatar_step2( BOOL proceed, const LLWearInfo wear_info);
|
||||
void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void*);
|
||||
void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, BOOL append);
|
||||
void remove_inventory_category_from_avatar(LLInventoryCategory* category);
|
||||
@@ -180,12 +188,6 @@ void gotAssetForSaveItemAs(LLVFS *vfs,
|
||||
void* user_data, S32 status, LLExtStat ext_status);
|
||||
// </edit>
|
||||
|
||||
struct LLWearInfo
|
||||
{
|
||||
LLUUID mCategoryID;
|
||||
BOOL mAppend;
|
||||
BOOL mReplace;
|
||||
};
|
||||
|
||||
// [RLVa:KB] - Made this part of LLWearableHoldingPattern
|
||||
//BOOL gAddToOutfit = FALSE;
|
||||
@@ -4688,31 +4690,27 @@ void wear_inventory_category_on_avatar(LLInventoryCategory* category, BOOL appen
|
||||
lldebugs << "wear_inventory_category_on_avatar( " << category->getName()
|
||||
<< " )" << llendl;
|
||||
|
||||
LLWearInfo* userdata = new LLWearInfo;
|
||||
userdata->mAppend = append;
|
||||
userdata->mReplace = replace;
|
||||
userdata->mCategoryID = category->getUUID();
|
||||
LLWearInfo wear_info;
|
||||
wear_info.mAppend = append;
|
||||
wear_info.mReplace = replace;
|
||||
wear_info.mCategoryID = category->getUUID();
|
||||
|
||||
if( gFloaterCustomize )
|
||||
{
|
||||
gFloaterCustomize->askToSaveIfDirty(
|
||||
wear_inventory_category_on_avatar_step2,
|
||||
userdata);
|
||||
boost::bind(wear_inventory_category_on_avatar_step2,_1,wear_info));
|
||||
}
|
||||
else
|
||||
{
|
||||
wear_inventory_category_on_avatar_step2(
|
||||
TRUE,
|
||||
userdata );
|
||||
wear_info );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
void wear_inventory_category_on_avatar_step2( BOOL proceed, const LLWearInfo wear_info )
|
||||
{
|
||||
LLWearInfo* wear_info = (LLWearInfo*)userdata;
|
||||
if (!wear_info) return;
|
||||
|
||||
// Find all the wearables that are in the category's subtree.
|
||||
lldebugs << "wear_inventory_category_on_avatar_step2()" << llendl;
|
||||
if(proceed)
|
||||
@@ -4720,7 +4718,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
LLInventoryModel::item_array_t item_array;
|
||||
LLFindWearables is_wearable;
|
||||
gInventory.collectDescendentsIf(wear_info->mCategoryID,
|
||||
gInventory.collectDescendentsIf(wear_info.mCategoryID,
|
||||
cat_array,
|
||||
item_array,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
@@ -4729,14 +4727,14 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
S32 wearable_count = item_array.count();
|
||||
|
||||
LLInventoryModel::item_array_t obj_items_new;
|
||||
LLCOFMgr::getDescendentsOfAssetType(wear_info->mCategoryID, obj_items_new, LLAssetType::AT_OBJECT, false);
|
||||
LLCOFMgr::getDescendentsOfAssetType(wear_info.mCategoryID, obj_items_new, LLAssetType::AT_OBJECT, false);
|
||||
S32 obj_count = obj_items_new.count();
|
||||
|
||||
// Find all gestures in this folder
|
||||
LLInventoryModel::cat_array_t gest_cat_array;
|
||||
LLInventoryModel::item_array_t gest_item_array;
|
||||
LLIsType is_gesture( LLAssetType::AT_GESTURE );
|
||||
gInventory.collectDescendentsIf(wear_info->mCategoryID,
|
||||
gInventory.collectDescendentsIf(wear_info.mCategoryID,
|
||||
gest_cat_array,
|
||||
gest_item_array,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
@@ -4746,7 +4744,6 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
if( !wearable_count && !obj_count && !gest_count)
|
||||
{
|
||||
LLNotificationsUtil::add("CouldNotPutOnOutfit");
|
||||
delete wear_info;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4765,7 +4762,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
|
||||
// Update the inventory item labels to reflect the fact
|
||||
// they are active.
|
||||
LLViewerInventoryCategory* catp = gInventory.getCategory(wear_info->mCategoryID);
|
||||
LLViewerInventoryCategory* catp = gInventory.getCategory(wear_info.mCategoryID);
|
||||
if (catp)
|
||||
{
|
||||
gInventory.updateCategory(catp);
|
||||
@@ -4781,7 +4778,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
// before the final getNextData().
|
||||
// LLWearableHoldingPattern* holder = new LLWearableHoldingPattern;
|
||||
// [RLVa:KB] - Checked: 2009-12-18 (RLVa-1.1.0i) | Added: RLVa-1.1.0i
|
||||
LLWearableHoldingPattern* holder = new LLWearableHoldingPattern(wear_info->mAppend);
|
||||
LLWearableHoldingPattern* holder = new LLWearableHoldingPattern(wear_info.mAppend);
|
||||
// [/RLVa:KB]
|
||||
LLFoundData* found;
|
||||
LLDynamicArray<LLFoundData*> found_container;
|
||||
@@ -4814,10 +4811,10 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
//
|
||||
// - Attachments: include COF contents only if appending.
|
||||
//
|
||||
if (!wear_info->mReplace)
|
||||
if (!wear_info.mReplace)
|
||||
{
|
||||
LLInventoryModel::item_array_t obj_items;
|
||||
if (wear_info->mAppend)
|
||||
if (wear_info.mAppend)
|
||||
LLCOFMgr::getDescendentsOfAssetType(idCOF, obj_items, LLAssetType::AT_OBJECT, false);
|
||||
// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0z) | Modified: RLVa-1.2.0b
|
||||
else if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_ANY)) )
|
||||
@@ -4855,11 +4852,9 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata )
|
||||
}
|
||||
}
|
||||
|
||||
if (!wear_info->mAppend)
|
||||
LLCOFMgr::instance().addBOFLink(wear_info->mCategoryID);
|
||||
if (!wear_info.mAppend)
|
||||
LLCOFMgr::instance().addBOFLink(wear_info.mCategoryID);
|
||||
}
|
||||
delete wear_info;
|
||||
wear_info = NULL;
|
||||
}
|
||||
|
||||
void wear_inventory_category_on_avatar_loop(LLWearable* wearable, void* data)
|
||||
@@ -4967,8 +4962,7 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
|
||||
if( gFloaterCustomize )
|
||||
{
|
||||
gFloaterCustomize->askToSaveIfDirty(
|
||||
remove_inventory_category_from_avatar_step2,
|
||||
uuid);
|
||||
boost::bind(remove_inventory_category_from_avatar_step2,_1,uuid));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llinventoryclipboard.cpp
|
||||
* @brief LLInventoryClipboard class implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llinventoryclipboard.h
|
||||
* @brief LLInventoryClipboard class header file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -31,44 +31,26 @@
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llinventorymodel.h"
|
||||
|
||||
#include "llassetstorage.h"
|
||||
#include "llcrc.h"
|
||||
#include "lldir.h"
|
||||
#include "llsys.h"
|
||||
#include "llxfermanager.h"
|
||||
#include "llagent.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventoryobserver.h"
|
||||
#include "message.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llfloater.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llwindow.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llpreview.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llfoldertype.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llappviewer.h"
|
||||
#include "lldbstrings.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llmutelist.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llcallbacklist.h"
|
||||
#include "llpreview.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llsdutil.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "statemachine/aievent.h"
|
||||
// <edit>
|
||||
#include "llappviewer.h" // gLostItemsRoot
|
||||
// </edit>
|
||||
#include <deque>
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
@@ -2614,10 +2596,10 @@ void LLInventoryModel::processUpdateInventoryFolder(LLMessageSystem* msg,
|
||||
gInventory.notifyObservers();
|
||||
|
||||
// *HACK: Do the 'show' logic for a new item in the inventory.
|
||||
LLInventoryView* view = LLInventoryView::getActiveInventory();
|
||||
if(view)
|
||||
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
|
||||
if (active_panel)
|
||||
{
|
||||
view->getPanel()->setSelection(lastfolder->getUUID(), TAKE_FOCUS_NO);
|
||||
active_panel->setSelection(lastfolder->getUUID(), TAKE_FOCUS_NO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +168,10 @@ private:
|
||||
//--------------------------------------------------------------------
|
||||
// Login
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
static BOOL getIsFirstTimeInViewer2();
|
||||
private:
|
||||
static BOOL sFirstTimeInViewer2;
|
||||
const static S32 sCurrentInvCacheVersion; // expected inventory cache version
|
||||
|
||||
/** Initialization/Setup
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "llvoavatarself.h"
|
||||
#include "llscrollcontainer.h"
|
||||
#include "llviewerassettype.h"
|
||||
#include "llpanelmaininventory.h"
|
||||
|
||||
#include "llsdserialize.h"
|
||||
|
||||
@@ -292,6 +293,13 @@ U32 LLInventoryPanel::getSortOrder() const
|
||||
return mFolderRoot->getSortOrder();
|
||||
}
|
||||
|
||||
// static
|
||||
LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel()
|
||||
{
|
||||
LLInventoryView *view = LLInventoryView::getActiveInventory();
|
||||
return view ? view->getPanel() : NULL;
|
||||
}
|
||||
|
||||
void LLInventoryPanel::setSinceLogoff(BOOL sl)
|
||||
{
|
||||
getFilter()->setDateRangeLastLogoff(sl);
|
||||
|
||||
@@ -165,6 +165,8 @@ public:
|
||||
|
||||
void setSortOrder(U32 order);
|
||||
U32 getSortOrder() const;
|
||||
|
||||
static LLInventoryPanel *getActiveInventoryPanel();
|
||||
private:
|
||||
const std::string mSortOrderSetting;
|
||||
LLUUID mSelectThisID; // if non null, select this item
|
||||
|
||||
@@ -662,7 +662,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* sticky_rec
|
||||
LLVector3d mypos = gAgent.getPositionGlobal();
|
||||
LLVector3d position = mClosestAgentPosition;
|
||||
|
||||
if ( LLFloaterAvatarList::getInstance() )
|
||||
if ( LLFloaterAvatarList::instanceExists() )
|
||||
{
|
||||
LLAvatarListEntry *ent = LLFloaterAvatarList::getInstance()->getAvatarEntry(mClosestAgentToCursor);
|
||||
if ( NULL != ent )
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
#include "lltool.h"
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "llpanel.h"
|
||||
|
||||
class LLButton;
|
||||
class LLPanelInventory;
|
||||
class LLPanelObjectInventory;
|
||||
class LLViewerObject;
|
||||
class LLCheckBoxCtrl;
|
||||
class LLSpinCtrl;
|
||||
@@ -58,7 +58,7 @@ protected:
|
||||
void getState(LLViewerObject *object);
|
||||
|
||||
public:
|
||||
LLPanelInventory* mPanelInventory;
|
||||
LLPanelObjectInventory* mPanelInventory;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llappviewer.h"
|
||||
|
||||
#include "rlvhandler.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llmanipscale.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llpreviewscript.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llselectmgr.h"
|
||||
|
||||
@@ -45,7 +45,7 @@ class LLUICtrl;
|
||||
class LLButton;
|
||||
class LLViewerObject;
|
||||
class LLComboBox;
|
||||
class LLPanelInventory;
|
||||
class LLPanelObjectInventory;
|
||||
class LLColorSwatchCtrl;
|
||||
class LLTextureCtrl;
|
||||
class LLInventoryItem;
|
||||
|
||||
@@ -1,36 +1,30 @@
|
||||
/**
|
||||
* @file llpanelinventory.cpp
|
||||
* @brief LLPanelInventory class implementation
|
||||
* @file llsidepanelinventory.cpp
|
||||
* @brief LLPanelObjectInventory class implementation
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// *****************************************************************************
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Implementation of the panel inventory - used to view and control a
|
||||
// task's inventory.
|
||||
@@ -39,66 +33,43 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include <sstream> // for std::ostringstream
|
||||
#include <utility> // for std::pair<>
|
||||
#include "llpanelobjectinventory.h"
|
||||
|
||||
#include "stdenums.h"
|
||||
#include "llpanelinventory.h"
|
||||
|
||||
#include "message.h"
|
||||
#include "lldarray.h"
|
||||
#include "llfontgl.h"
|
||||
#include "llassetstorage.h"
|
||||
#include "llfoldervieweventlistener.h"
|
||||
#include "llinventory.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "roles_constants.h"
|
||||
|
||||
#include "llagent.h"
|
||||
#include "llcallbacklist.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llfloaterbuycontents.h"
|
||||
#include "llfloaterbuycurrency.h"
|
||||
#include "llfloaterproperties.h"
|
||||
#include "llfolderview.h"
|
||||
#include "llgl.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfilter.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llpreviewanim.h"
|
||||
#include "llpreviewgesture.h"
|
||||
#include "llpreviewnotecard.h"
|
||||
#include "llpreviewscript.h"
|
||||
#include "llpreviewsound.h"
|
||||
#include "llpreviewtexture.h"
|
||||
#include "roles_constants.h"
|
||||
#include "llscrollcontainer.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "llstatusbar.h"
|
||||
#include "lltooldraganddrop.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llwearable.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewerassettype.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewermessage.h"
|
||||
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
#include "hippogridmanager.h"
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function declarations, constants, enums, and typedefs
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLTaskInvFVBridge
|
||||
@@ -110,23 +81,22 @@ protected:
|
||||
LLUUID mUUID;
|
||||
std::string mName;
|
||||
mutable std::string mDisplayName;
|
||||
LLPanelInventory* mPanel;
|
||||
LLPanelObjectInventory* mPanel;
|
||||
U32 mFlags;
|
||||
|
||||
LLInventoryItem* findItem() const;
|
||||
|
||||
public:
|
||||
LLTaskInvFVBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
LLTaskInvFVBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
U32 flags=0);
|
||||
virtual ~LLTaskInvFVBridge( void ) {}
|
||||
virtual ~LLTaskInvFVBridge( ) {}
|
||||
|
||||
virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; }
|
||||
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
|
||||
|
||||
static LLTaskInvFVBridge* createObjectBridge(LLPanelInventory* panel,
|
||||
static LLTaskInvFVBridge* createObjectBridge(LLPanelObjectInventory* panel,
|
||||
LLInventoryObject* object);
|
||||
void showProperties();
|
||||
void buyItem();
|
||||
@@ -161,6 +131,7 @@ public:
|
||||
virtual BOOL isUpToDate() const { return TRUE; }
|
||||
virtual BOOL hasChildren() const { return FALSE; }
|
||||
virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; }
|
||||
|
||||
// LLDragAndDropBridge functionality
|
||||
virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const;
|
||||
virtual BOOL dragOrDrop(MASK mask, BOOL drop,
|
||||
@@ -171,7 +142,7 @@ public:
|
||||
};
|
||||
|
||||
LLTaskInvFVBridge::LLTaskInvFVBridge(
|
||||
LLPanelInventory* panel,
|
||||
LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
U32 flags):
|
||||
@@ -275,7 +246,7 @@ void LLTaskInvFVBridge::buyItem()
|
||||
payload["task_id"] = inv->mTaskID;
|
||||
payload["item_id"] = inv->mItemID;
|
||||
payload["type"] = inv->mType;
|
||||
LLNotifications::instance().add(alertdesc, args, payload, LLTaskInvFVBridge::commitBuyItem);
|
||||
LLNotificationsUtil::add(alertdesc, args, payload, LLTaskInvFVBridge::commitBuyItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +266,7 @@ S32 LLTaskInvFVBridge::getPrice()
|
||||
// static
|
||||
bool LLTaskInvFVBridge::commitBuyItem(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if(0 == option)
|
||||
{
|
||||
LLViewerObject* object = gObjectList.findObject(notification["payload"]["task_id"].asUUID());
|
||||
@@ -311,6 +282,7 @@ bool LLTaskInvFVBridge::commitBuyItem(const LLSD& notification, const LLSD& resp
|
||||
msg->addUUIDFast(_PREHASH_ObjectID, notification["payload"]["task_id"].asUUID());
|
||||
msg->addUUIDFast(_PREHASH_ItemID, notification["payload"]["item_id"].asUUID());
|
||||
msg->addUUIDFast(_PREHASH_FolderID,
|
||||
//"type" should be LLAssetType::AssetType, not LLFolderType::EType
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType((LLAssetType::EType)notification["payload"]["type"].asInteger())));
|
||||
msg->sendReliable(object->getRegion()->getHost());
|
||||
}
|
||||
@@ -359,11 +331,7 @@ time_t LLTaskInvFVBridge::getCreationDate() const
|
||||
|
||||
LLUIImagePtr LLTaskInvFVBridge::getIcon() const
|
||||
{
|
||||
BOOL item_is_multi = FALSE;
|
||||
if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
|
||||
{
|
||||
item_is_multi = TRUE;
|
||||
}
|
||||
const BOOL item_is_multi = (mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS);
|
||||
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_OBJECT, LLInventoryType::IT_OBJECT, 0, item_is_multi );
|
||||
}
|
||||
@@ -393,8 +361,7 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const
|
||||
// LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
|
||||
if(object)
|
||||
{
|
||||
LLInventoryItem* item;
|
||||
item = (LLInventoryItem*)(object->getInventoryObject(mUUID));
|
||||
LLInventoryItem* item = (LLInventoryItem*)(object->getInventoryObject(mUUID));
|
||||
if(item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(),
|
||||
GP_OBJECT_MANIPULATE, GOD_LIKE))
|
||||
{
|
||||
@@ -491,13 +458,9 @@ BOOL LLTaskInvFVBridge::isItemRemovable()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// helper for remove
|
||||
typedef std::pair<LLUUID, std::list<LLUUID> > two_uuids_list_t;
|
||||
typedef std::pair<LLPanelInventory*, two_uuids_list_t> remove_data_t;
|
||||
|
||||
bool remove_task_inventory_callback(const LLSD& notification, const LLSD& response, LLPanelInventory* panel)
|
||||
bool remove_task_inventory_callback(const LLSD& notification, const LLSD& response, LLPanelObjectInventory* panel)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLViewerObject* object = gObjectList.findObject(notification["payload"]["task_id"].asUUID());
|
||||
if(option == 0 && object)
|
||||
{
|
||||
@@ -516,6 +479,10 @@ bool remove_task_inventory_callback(const LLSD& notification, const LLSD& respon
|
||||
return false;
|
||||
}
|
||||
|
||||
// helper for remove
|
||||
// ! REFACTOR ! two_uuids_list_t is also defined in llinventorybridge.h, but differently.
|
||||
typedef std::pair<LLUUID, std::list<LLUUID> > panel_two_uuids_list_t;
|
||||
typedef std::pair<LLPanelObjectInventory*, panel_two_uuids_list_t> remove_data_t;
|
||||
BOOL LLTaskInvFVBridge::removeItem()
|
||||
{
|
||||
if(isItemRemovable() && mPanel)
|
||||
@@ -531,10 +498,6 @@ BOOL LLTaskInvFVBridge::removeItem()
|
||||
}
|
||||
else
|
||||
{
|
||||
remove_data_t* data = new remove_data_t;
|
||||
data->first = mPanel;
|
||||
data->second.first = mPanel->getTaskUUID();
|
||||
data->second.second.push_back(mUUID);
|
||||
LLSD payload;
|
||||
payload["task_id"] = mPanel->getTaskUUID();
|
||||
payload["inventory_ids"].append(mUUID);
|
||||
@@ -812,7 +775,7 @@ class LLTaskCategoryBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskCategoryBridge(
|
||||
LLPanelInventory* panel,
|
||||
LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
|
||||
@@ -830,7 +793,7 @@ public:
|
||||
};
|
||||
|
||||
LLTaskCategoryBridge::LLTaskCategoryBridge(
|
||||
LLPanelInventory* panel,
|
||||
LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
@@ -915,9 +878,8 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
|
||||
case DAD_BODYPART:
|
||||
case DAD_ANIMATION:
|
||||
case DAD_GESTURE:
|
||||
// <edit>
|
||||
case DAD_CALLINGCARD:
|
||||
// </edit>
|
||||
case DAD_MESH:
|
||||
// *HACK: In order to resolve SL-22177, we need to block
|
||||
// drags from notecards and objects onto other
|
||||
// objects. uncomment the simpler version when we have
|
||||
@@ -965,9 +927,6 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
|
||||
LLToolDragAndDrop::getInstance()->getSourceID());
|
||||
}
|
||||
break;
|
||||
// <edit>
|
||||
//case DAD_CALLINGCARD:
|
||||
// </edit>
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -982,11 +941,11 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,
|
||||
class LLTaskTextureBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskTextureBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
LLInventoryType::EType it);
|
||||
LLTaskTextureBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
LLInventoryType::EType it,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name), mInventoryType(it){}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
virtual void openItem();
|
||||
@@ -994,16 +953,6 @@ protected:
|
||||
LLInventoryType::EType mInventoryType;
|
||||
};
|
||||
|
||||
LLTaskTextureBridge::LLTaskTextureBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
LLInventoryType::EType it) :
|
||||
LLTaskInvFVBridge(panel, uuid, name),
|
||||
mInventoryType(it)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskTextureBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_TEXTURE, mInventoryType, 0, FALSE);
|
||||
@@ -1044,10 +993,10 @@ void LLTaskTextureBridge::openItem()
|
||||
class LLTaskSoundBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskSoundBridge(
|
||||
LLPanelInventory* panel,
|
||||
LLTaskSoundBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
virtual void openItem();
|
||||
@@ -1056,19 +1005,11 @@ public:
|
||||
static void openSoundPreview(void* data);
|
||||
};
|
||||
|
||||
LLTaskSoundBridge::LLTaskSoundBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskSoundBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_SOUND, LLInventoryType::IT_SOUND, 0, FALSE);
|
||||
}
|
||||
|
||||
void LLTaskSoundBridge::openItem()
|
||||
{
|
||||
openSoundPreview((void*)this);
|
||||
@@ -1077,7 +1018,8 @@ void LLTaskSoundBridge::openItem()
|
||||
void LLTaskSoundBridge::openSoundPreview(void* data)
|
||||
{
|
||||
LLTaskSoundBridge* self = (LLTaskSoundBridge*)data;
|
||||
if(!self) return;
|
||||
if(!self)
|
||||
return;
|
||||
if(!LLPreview::show(self->mUUID))
|
||||
{
|
||||
// There isn't one, so make a new preview
|
||||
@@ -1182,28 +1124,18 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
class LLTaskLandmarkBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskLandmarkBridge(
|
||||
LLPanelInventory* panel,
|
||||
LLTaskLandmarkBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
};
|
||||
|
||||
LLTaskLandmarkBridge::LLTaskLandmarkBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskLandmarkBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_LANDMARK, LLInventoryType::IT_LANDMARK, 0, FALSE);
|
||||
}
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLTaskCallingCardBridge
|
||||
///----------------------------------------------------------------------------
|
||||
@@ -1211,24 +1143,15 @@ LLUIImagePtr LLTaskLandmarkBridge::getIcon() const
|
||||
class LLTaskCallingCardBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskCallingCardBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
LLTaskCallingCardBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
virtual BOOL isItemRenameable() const;
|
||||
virtual BOOL renameItem(const std::string& new_name);
|
||||
};
|
||||
|
||||
LLTaskCallingCardBridge::LLTaskCallingCardBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskCallingCardBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_CALLINGCARD, LLInventoryType::IT_CALLINGCARD, 0, FALSE);
|
||||
@@ -1252,36 +1175,28 @@ BOOL LLTaskCallingCardBridge::renameItem(const std::string& new_name)
|
||||
class LLTaskScriptBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskScriptBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
LLTaskScriptBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
//static BOOL enableIfCopyable( void* userdata );
|
||||
};
|
||||
|
||||
LLTaskScriptBridge::LLTaskScriptBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskScriptBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_SCRIPT, LLInventoryType::IT_LSL, 0, FALSE);
|
||||
}
|
||||
|
||||
|
||||
class LLTaskLSLBridge : public LLTaskScriptBridge
|
||||
{
|
||||
public:
|
||||
LLTaskLSLBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
LLTaskLSLBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskScriptBridge(panel, uuid, name) {}
|
||||
|
||||
virtual void openItem();
|
||||
virtual BOOL removeItem();
|
||||
@@ -1290,14 +1205,6 @@ public:
|
||||
//static void copyToInventory(void* userdata);
|
||||
};
|
||||
|
||||
LLTaskLSLBridge::LLTaskLSLBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskScriptBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
void LLTaskLSLBridge::openItem()
|
||||
{
|
||||
llinfos << "LLTaskLSLBridge::openItem() " << mUUID << llendl;
|
||||
@@ -1361,21 +1268,15 @@ BOOL LLTaskLSLBridge::removeItem()
|
||||
class LLTaskObjectBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskObjectBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
LLTaskObjectBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
U32 flags = 0) :
|
||||
LLTaskInvFVBridge(panel, uuid, name, flags) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
};
|
||||
|
||||
LLTaskObjectBridge::LLTaskObjectBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskObjectBridge::getIcon() const
|
||||
{
|
||||
@@ -1395,24 +1296,16 @@ LLUIImagePtr LLTaskObjectBridge::getIcon() const
|
||||
class LLTaskNotecardBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskNotecardBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
LLTaskNotecardBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
virtual void openItem();
|
||||
virtual BOOL removeItem();
|
||||
};
|
||||
|
||||
LLTaskNotecardBridge::LLTaskNotecardBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskNotecardBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, 0, FALSE);
|
||||
@@ -1469,24 +1362,16 @@ BOOL LLTaskNotecardBridge::removeItem()
|
||||
class LLTaskGestureBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskGestureBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
LLTaskGestureBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
virtual void openItem();
|
||||
virtual BOOL removeItem();
|
||||
};
|
||||
|
||||
LLTaskGestureBridge::LLTaskGestureBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskGestureBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, 0, FALSE);
|
||||
@@ -1529,24 +1414,16 @@ BOOL LLTaskGestureBridge::removeItem()
|
||||
class LLTaskAnimationBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskAnimationBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name);
|
||||
LLTaskAnimationBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
virtual void openItem();
|
||||
virtual BOOL removeItem();
|
||||
};
|
||||
|
||||
LLTaskAnimationBridge::LLTaskAnimationBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name) :
|
||||
LLTaskInvFVBridge(panel, uuid, name)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskAnimationBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(LLAssetType::AT_ANIMATION, LLInventoryType::IT_ANIMATION, 0, FALSE);
|
||||
@@ -1607,12 +1484,12 @@ BOOL LLTaskAnimationBridge::removeItem()
|
||||
class LLTaskWearableBridge : public LLTaskInvFVBridge
|
||||
{
|
||||
public:
|
||||
LLTaskWearableBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
LLAssetType::EType asset_type,
|
||||
U32 flags);
|
||||
LLTaskWearableBridge(LLPanelObjectInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
LLAssetType::EType asset_type,
|
||||
U32 flags) :
|
||||
LLTaskInvFVBridge(panel, uuid, name, flags), mAssetType(asset_type) {}
|
||||
|
||||
virtual LLUIImagePtr getIcon() const;
|
||||
|
||||
@@ -1620,102 +1497,93 @@ protected:
|
||||
LLAssetType::EType mAssetType;
|
||||
};
|
||||
|
||||
LLTaskWearableBridge::LLTaskWearableBridge(
|
||||
LLPanelInventory* panel,
|
||||
const LLUUID& uuid,
|
||||
const std::string& name,
|
||||
LLAssetType::EType asset_type,
|
||||
U32 flags) :
|
||||
LLTaskInvFVBridge(panel, uuid, name, flags),
|
||||
mAssetType( asset_type )
|
||||
{
|
||||
}
|
||||
|
||||
LLUIImagePtr LLTaskWearableBridge::getIcon() const
|
||||
{
|
||||
return LLInventoryIcon::getIcon(mAssetType, LLInventoryType::IT_WEARABLE, mFlags, FALSE );
|
||||
}
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLTaskInvFVBridge impl
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelInventory* panel,
|
||||
LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* panel,
|
||||
LLInventoryObject* object)
|
||||
{
|
||||
LLTaskInvFVBridge* new_bridge = NULL;
|
||||
LLAssetType::EType type = object->getType();
|
||||
LLInventoryItem* item = NULL;
|
||||
const LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(object);
|
||||
const U32 itemflags = ( NULL == item ? 0 : item->getFlags() );
|
||||
LLAssetType::EType type = object ? object->getType() : LLAssetType::AT_CATEGORY;
|
||||
LLUUID object_id = object ? object->getUUID() : LLUUID::null;
|
||||
std::string object_name = object ? object->getName() : std::string();
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case LLAssetType::AT_TEXTURE:
|
||||
item = (LLInventoryItem*)object;
|
||||
new_bridge = new LLTaskTextureBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName(),
|
||||
item->getInventoryType());
|
||||
object_id,
|
||||
item->getInventoryType(),
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_SOUND:
|
||||
new_bridge = new LLTaskSoundBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_LANDMARK:
|
||||
new_bridge = new LLTaskLandmarkBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_CALLINGCARD:
|
||||
new_bridge = new LLTaskCallingCardBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_SCRIPT:
|
||||
// OLD SCRIPTS DEPRECATED - JC
|
||||
llwarns << "Old script" << llendl;
|
||||
//new_bridge = new LLTaskOldScriptBridge(panel,
|
||||
// object->getUUID(),
|
||||
// object->getName());
|
||||
// object_id,
|
||||
// object_name);
|
||||
break;
|
||||
case LLAssetType::AT_OBJECT:
|
||||
new_bridge = new LLTaskObjectBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_NOTECARD:
|
||||
new_bridge = new LLTaskNotecardBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_ANIMATION:
|
||||
new_bridge = new LLTaskAnimationBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_GESTURE:
|
||||
new_bridge = new LLTaskGestureBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
case LLAssetType::AT_BODYPART:
|
||||
item = (LLInventoryItem*)object;
|
||||
new_bridge = new LLTaskWearableBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName(),
|
||||
type,
|
||||
item->getFlags());
|
||||
object_id,
|
||||
object_name,
|
||||
type,
|
||||
itemflags);
|
||||
break;
|
||||
case LLAssetType::AT_CATEGORY:
|
||||
new_bridge = new LLTaskCategoryBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
case LLAssetType::AT_LSL_TEXT:
|
||||
new_bridge = new LLTaskLSLBridge(panel,
|
||||
object->getUUID(),
|
||||
object->getName());
|
||||
object_id,
|
||||
object_name);
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
llinfos << "Unhandled inventory type (llassetstorage.h): "
|
||||
@@ -1727,11 +1595,11 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelInventory* panel
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLPanelInventory
|
||||
/// Class LLPanelObjectInventory
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// Default constructor
|
||||
LLPanelInventory::LLPanelInventory(const std::string& name, const LLRect& rect) :
|
||||
LLPanelObjectInventory::LLPanelObjectInventory(const std::string& name, const LLRect& rect) :
|
||||
LLPanel(name, rect),
|
||||
mScroller(NULL),
|
||||
mFolders(NULL),
|
||||
@@ -1746,16 +1614,16 @@ LLPanelInventory::LLPanelInventory(const std::string& name, const LLRect& rect)
|
||||
}
|
||||
|
||||
// Destroys the object
|
||||
LLPanelInventory::~LLPanelInventory()
|
||||
LLPanelObjectInventory::~LLPanelObjectInventory()
|
||||
{
|
||||
if (!gIdleCallbacks.deleteFunction(idle, this))
|
||||
{
|
||||
llwarns << "LLPanelInventory::~LLPanelInventory() failed to delete callback" << llendl;
|
||||
llwarns << "LLPanelObjectInventory::~LLPanelObjectInventory() failed to delete callback" << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLPanelInventory::clearContents()
|
||||
void LLPanelObjectInventory::clearContents()
|
||||
{
|
||||
mHaveInventory = FALSE;
|
||||
mIsInventoryEmpty = TRUE;
|
||||
@@ -1775,7 +1643,7 @@ void LLPanelInventory::clearContents()
|
||||
}
|
||||
|
||||
|
||||
void LLPanelInventory::reset()
|
||||
void LLPanelObjectInventory::reset()
|
||||
{
|
||||
clearContents();
|
||||
|
||||
@@ -1794,7 +1662,7 @@ void LLPanelInventory::reset()
|
||||
mFolders->setScrollContainer( mScroller );
|
||||
}
|
||||
|
||||
void LLPanelInventory::inventoryChanged(LLViewerObject* object,
|
||||
void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object,
|
||||
LLInventoryObject::object_list_t* inventory,
|
||||
S32 serial_num,
|
||||
void* data)
|
||||
@@ -1837,7 +1705,7 @@ void LLPanelInventory::inventoryChanged(LLViewerObject* object,
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelInventory::updateInventory()
|
||||
void LLPanelObjectInventory::updateInventory()
|
||||
{
|
||||
//llinfos << "inventory arrived: \n"
|
||||
// << " panel UUID: " << panel->mTaskUUID << "\n"
|
||||
@@ -1910,7 +1778,7 @@ void LLPanelInventory::updateInventory()
|
||||
// leads to an N^2 based on the category count. This could be greatly
|
||||
// speeded with an efficient multimap implementation, but we don't
|
||||
// have that in our current arsenal.
|
||||
void LLPanelInventory::createFolderViews(LLInventoryObject* inventory_root, LLInventoryObject::object_list_t& contents)
|
||||
void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root, LLInventoryObject::object_list_t& contents)
|
||||
{
|
||||
if (!inventory_root)
|
||||
{
|
||||
@@ -1935,7 +1803,7 @@ void LLPanelInventory::createFolderViews(LLInventoryObject* inventory_root, LLIn
|
||||
|
||||
typedef std::pair<LLInventoryObject*, LLFolderViewFolder*> obj_folder_pair;
|
||||
|
||||
void LLPanelInventory::createViewsForCategory(LLInventoryObject::object_list_t* inventory,
|
||||
void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_list_t* inventory,
|
||||
LLInventoryObject* parent,
|
||||
LLFolderViewFolder* folder)
|
||||
{
|
||||
@@ -1987,9 +1855,9 @@ void LLPanelInventory::createViewsForCategory(LLInventoryObject::object_list_t*
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelInventory::refresh()
|
||||
void LLPanelObjectInventory::refresh()
|
||||
{
|
||||
//llinfos << "LLPanelInventory::refresh()" << llendl;
|
||||
//llinfos << "LLPanelObjectInventory::refresh()" << llendl;
|
||||
BOOL has_inventory = FALSE;
|
||||
const BOOL non_root_ok = TRUE;
|
||||
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
|
||||
@@ -2042,10 +1910,10 @@ void LLPanelInventory::refresh()
|
||||
removeVOInventoryListener();
|
||||
clearContents();
|
||||
}
|
||||
//llinfos << "LLPanelInventory::refresh() " << mTaskUUID << llendl;
|
||||
//llinfos << "LLPanelObjectInventory::refresh() " << mTaskUUID << llendl;
|
||||
}
|
||||
|
||||
void LLPanelInventory::removeSelectedItem()
|
||||
void LLPanelObjectInventory::removeSelectedItem()
|
||||
{
|
||||
if(mFolders)
|
||||
{
|
||||
@@ -2053,7 +1921,7 @@ void LLPanelInventory::removeSelectedItem()
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelInventory::startRenamingSelectedItem()
|
||||
void LLPanelObjectInventory::startRenamingSelectedItem()
|
||||
{
|
||||
if(mFolders)
|
||||
{
|
||||
@@ -2061,7 +1929,7 @@ void LLPanelInventory::startRenamingSelectedItem()
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelInventory::draw()
|
||||
void LLPanelObjectInventory::draw()
|
||||
{
|
||||
LLPanel::draw();
|
||||
|
||||
@@ -2089,14 +1957,14 @@ void LLPanelInventory::draw()
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelInventory::deleteAllChildren()
|
||||
void LLPanelObjectInventory::deleteAllChildren()
|
||||
{
|
||||
mScroller = NULL;
|
||||
mFolders = NULL;
|
||||
LLView::deleteAllChildren();
|
||||
}
|
||||
|
||||
BOOL LLPanelInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
|
||||
BOOL LLPanelObjectInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
|
||||
{
|
||||
if (mFolders && mHaveInventory)
|
||||
{
|
||||
@@ -2126,9 +1994,9 @@ BOOL LLPanelInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDr
|
||||
}
|
||||
|
||||
//static
|
||||
void LLPanelInventory::idle(void* user_data)
|
||||
void LLPanelObjectInventory::idle(void* user_data)
|
||||
{
|
||||
LLPanelInventory* self = (LLPanelInventory*)user_data;
|
||||
LLPanelObjectInventory* self = (LLPanelObjectInventory*)user_data;
|
||||
|
||||
|
||||
if (self->mInventoryNeedsUpdate)
|
||||
@@ -1,62 +1,41 @@
|
||||
/**
|
||||
* @file llpanelinventory.h
|
||||
* @brief LLPanelInventory class definition
|
||||
* @file llpanelobjectinventory.h
|
||||
* @brief LLPanelObjectInventory class definition
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// *****************************************************************************
|
||||
//
|
||||
// This class represents the panel used to view and control a
|
||||
// particular task's inventory.
|
||||
//
|
||||
// *****************************************************************************
|
||||
#ifndef LL_LLPANELOBJECTINVENTORY_H
|
||||
#define LL_LLPANELOBJECTINVENTORY_H
|
||||
|
||||
#ifndef LL_LLPANELINVENTORY_H
|
||||
#define LL_LLPANELINVENTORY_H
|
||||
|
||||
#include "llinventory.h"
|
||||
#include "lluuid.h"
|
||||
#include "llmap.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llvoinventorylistener.h"
|
||||
#include "llpanel.h"
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLPanelInventory
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#include "llinventory.h"
|
||||
|
||||
class LLScrollableContainerView;
|
||||
class LLFolderView;
|
||||
class LLFolderViewFolder;
|
||||
class LLViewerObject;
|
||||
class LLFolderViewEventListener;
|
||||
//class LLVOInventoryListener;
|
||||
|
||||
// Utility function to hide all entries except those in the list
|
||||
class LLMenuGL;
|
||||
@@ -64,16 +43,32 @@ void hide_context_entries(LLMenuGL& menu,
|
||||
const std::vector<std::string> &entries_to_show,
|
||||
const std::vector<std::string> &disabled_entries);
|
||||
|
||||
class LLPanelInventory : public LLPanel, public LLVOInventoryListener
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLPanelObjectInventory
|
||||
//
|
||||
// This class represents the panel used to view and control a
|
||||
// particular task's inventory.
|
||||
//
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class LLPanelObjectInventory : public LLPanel, public LLVOInventoryListener
|
||||
{
|
||||
protected:
|
||||
LLScrollableContainerView* mScroller;
|
||||
LLFolderView* mFolders;
|
||||
public:
|
||||
LLPanelObjectInventory(const std::string& name, const LLRect& rect);
|
||||
virtual ~LLPanelObjectInventory();
|
||||
|
||||
void refresh();
|
||||
const LLUUID& getTaskUUID() { return mTaskUUID;}
|
||||
void removeSelectedItem();
|
||||
void startRenamingSelectedItem();
|
||||
|
||||
LLUUID mTaskUUID;
|
||||
BOOL mHaveInventory;
|
||||
BOOL mIsInventoryEmpty;
|
||||
BOOL mInventoryNeedsUpdate;
|
||||
LLFolderView* getRootFolder() const { return mFolders; }
|
||||
|
||||
virtual void draw();
|
||||
virtual void deleteAllChildren();
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
|
||||
|
||||
|
||||
static void idle(void* user_data);
|
||||
|
||||
protected:
|
||||
void reset();
|
||||
@@ -89,24 +84,16 @@ protected:
|
||||
|
||||
void clearContents();
|
||||
|
||||
public:
|
||||
LLPanelInventory(const std::string& name, const LLRect& rect);
|
||||
virtual ~LLPanelInventory();
|
||||
|
||||
void refresh();
|
||||
const LLUUID& getTaskUUID() { return mTaskUUID;}
|
||||
void removeSelectedItem();
|
||||
void startRenamingSelectedItem();
|
||||
|
||||
LLFolderView* getRootFolder() const { return mFolders; }
|
||||
|
||||
virtual void draw();
|
||||
virtual void deleteAllChildren();
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg);
|
||||
private:
|
||||
LLScrollableContainerView* mScroller;
|
||||
LLFolderView* mFolders;
|
||||
|
||||
static void idle(void* user_data);
|
||||
LLUUID mTaskUUID;
|
||||
BOOL mHaveInventory;
|
||||
BOOL mIsInventoryEmpty;
|
||||
BOOL mInventoryNeedsUpdate;
|
||||
};
|
||||
|
||||
void init_object_inventory_panel_actions(LLPanelInventory *panel);
|
||||
void init_object_inventory_panel_actions(LLPanelObjectInventory *panel);
|
||||
|
||||
#endif // LL_LLPANELINVENTORY_H
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "llfirstuse.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llmanipscale.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
#include "llpreviewscript.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llselectmgr.h"
|
||||
|
||||
@@ -45,7 +45,7 @@ class LLUICtrl;
|
||||
class LLButton;
|
||||
class LLViewerObject;
|
||||
class LLComboBox;
|
||||
class LLPanelInventory;
|
||||
class LLPanelObjectInventory;
|
||||
class LLColorSwatchCtrl;
|
||||
|
||||
class LLPanelVolume : public LLPanel
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llpolymesh.cpp
|
||||
* @brief Implementation of LLPolyMesh class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -35,16 +29,18 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llpolymesh.h"
|
||||
#include "llfasttimer.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
#include "llviewercontrol.h"
|
||||
#include "llxmltree.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llwearable.h"
|
||||
#include "lldir.h"
|
||||
#include "llvolume.h"
|
||||
#include "llendianswizzle.h"
|
||||
|
||||
#include "llfasttimer.h"
|
||||
#include "llpolymesh.h"
|
||||
|
||||
#define HEADER_ASCII "Linden Mesh 1.0"
|
||||
#define HEADER_BINARY "Linden Binary Mesh 1.0"
|
||||
@@ -1881,9 +1877,9 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
|
||||
llwarns << "Offset deformation already supplied for joint " << joint->getName() << "." << llendl;
|
||||
}
|
||||
mJointOffsets[joint] = bone_info->mPositionDeformation;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1891,10 +1887,10 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLPolySkeletalDistortion::apply( ESex avatar_sex )
|
||||
{
|
||||
F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight();
|
||||
F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight();
|
||||
|
||||
LLJoint* joint;
|
||||
joint_vec_map_t::iterator iter;
|
||||
LLJoint* joint;
|
||||
joint_vec_map_t::iterator iter;
|
||||
|
||||
for (iter = mJointScales.begin();
|
||||
iter != mJointScales.end();
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llpolymesh.h
|
||||
* @brief Implementation of LLPolyMesh class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -46,6 +40,7 @@
|
||||
|
||||
class LLSkinJoint;
|
||||
class LLVOAvatar;
|
||||
class LLWearable;
|
||||
|
||||
//#define USE_STRIPS // Use tri-strips for rendering.
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llpolymorph.cpp
|
||||
* @brief Implementation of LLPolyMesh class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -37,6 +31,7 @@
|
||||
|
||||
#include "llpolymorph.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llwearable.h"
|
||||
#include "llxmltree.h"
|
||||
#include "llendianswizzle.h"
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ class LLPolyMeshSharedData;
|
||||
class LLVOAvatar;
|
||||
class LLVector2;
|
||||
class LLViewerJointCollisionVolume;
|
||||
class LLWearable;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLPolyMorphData()
|
||||
|
||||
@@ -459,7 +459,8 @@ void LLPreview::onBtnCopyToInv(void* userdata)
|
||||
if (self->mNotecardInventoryID.notNull())
|
||||
{
|
||||
copy_inventory_from_notecard(self->mObjectID,
|
||||
self->mNotecardInventoryID, item);
|
||||
self->mNotecardInventoryID,
|
||||
item);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -95,12 +95,9 @@ protected:
|
||||
|
||||
void LLInventoryGestureAvailable::done()
|
||||
{
|
||||
LLPreview* preview = NULL;
|
||||
uuid_vec_t::iterator it = mComplete.begin();
|
||||
uuid_vec_t::iterator end = mComplete.end();
|
||||
for(; it < end; ++it)
|
||||
for(uuid_vec_t::iterator it = mComplete.begin(); it != mComplete.end(); ++it)
|
||||
{
|
||||
preview = LLPreview::find((*it));
|
||||
LLPreview *preview = LLPreview::find((*it));
|
||||
if(preview)
|
||||
{
|
||||
preview->refresh();
|
||||
@@ -166,7 +163,7 @@ LLPreviewGesture* LLPreviewGesture::show(const std::string& title, const LLUUID&
|
||||
|
||||
// this will call refresh when we have everything.
|
||||
LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem();
|
||||
if(item && !item->isComplete())
|
||||
if (item && !item->isFinished())
|
||||
{
|
||||
LLInventoryGestureAvailable* observer;
|
||||
observer = new LLInventoryGestureAvailable();
|
||||
@@ -188,6 +185,11 @@ LLPreviewGesture* LLPreviewGesture::show(const std::string& title, const LLUUID&
|
||||
return self;
|
||||
}
|
||||
|
||||
void LLPreviewGesture::draw()
|
||||
{
|
||||
// Skip LLPreview::draw() to avoid description update
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
// virtual
|
||||
BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask)
|
||||
@@ -888,7 +890,13 @@ void LLPreviewGesture::initDefaultGesture()
|
||||
void LLPreviewGesture::loadAsset()
|
||||
{
|
||||
const LLInventoryItem* item = getItem();
|
||||
if (!item) return;
|
||||
if (!item)
|
||||
{
|
||||
// Don't set asset status here; we may not have set the item id yet
|
||||
// (e.g. when this gets called initially)
|
||||
//mAssetStatus = PREVIEW_ASSET_ERROR;
|
||||
return;
|
||||
}
|
||||
|
||||
LLUUID asset_id = item->getAssetUUID();
|
||||
if (asset_id.isNull())
|
||||
@@ -897,6 +905,7 @@ void LLPreviewGesture::loadAsset()
|
||||
// Blank gesture will be fine.
|
||||
initDefaultGesture();
|
||||
refresh();
|
||||
mAssetStatus = PREVIEW_ASSET_LOADED;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -952,6 +961,7 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs,
|
||||
|
||||
self->mDirty = FALSE;
|
||||
self->refresh();
|
||||
self->refreshFromItem(self->getItem()); // to update description and title
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -55,6 +55,7 @@ public:
|
||||
static LLPreviewGesture* show(const std::string& title, const LLUUID& item_id, const LLUUID& object_id, BOOL take_focus = TRUE);
|
||||
|
||||
// LLView
|
||||
virtual void draw();
|
||||
virtual BOOL handleKeyHere(KEY key, MASK mask);
|
||||
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
|
||||
EDragAndDropType cargo_type,
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llpanelinventory.h"
|
||||
#include "llpanelobjectinventory.h"
|
||||
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -204,6 +204,8 @@
|
||||
#include "llwlparammanager.h"
|
||||
#include "llwaterparammanager.h"
|
||||
#include "llagentlanguage.h"
|
||||
#include "llwearable.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llsocks5.h"
|
||||
#include "jcfloaterareasearch.h"
|
||||
|
||||
@@ -234,8 +236,6 @@
|
||||
// exported globals
|
||||
//
|
||||
bool gAgentMovementCompleted = false;
|
||||
std::string gInitialOutfit;
|
||||
std::string gInitialOutfitGender;
|
||||
|
||||
std::string SCREEN_HOME_FILENAME = "screen_home.bmp";
|
||||
std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
|
||||
@@ -2092,7 +2092,7 @@ bool idle_startup()
|
||||
// <edit>
|
||||
else if (gSavedSettings.getBOOL("RadarKeepOpen"))
|
||||
{
|
||||
LLFloaterAvatarList::createInstance(false);
|
||||
LLFloaterAvatarList::getInstance()->close();
|
||||
}
|
||||
if (gSavedSettings.getBOOL("SHShowMediaTicker"))
|
||||
{
|
||||
@@ -2918,7 +2918,7 @@ bool idle_startup()
|
||||
const F32 wearables_time = wearables_timer.getElapsedTimeF32();
|
||||
const F32 MAX_WEARABLES_TIME = 10.f;
|
||||
|
||||
if (!gAgent.isGenderChosen())
|
||||
if (!gAgent.isGenderChosen() && isAgentAvatarValid())
|
||||
{
|
||||
// No point in waiting for clothing, we don't even
|
||||
// know what gender we are. Pop a dialog to ask and
|
||||
|
||||
@@ -2,33 +2,26 @@
|
||||
* @file lltexlayerparams.cpp
|
||||
* @brief Texture layer parameters
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2010, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlife.com/developers/opensource/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
@@ -152,6 +152,8 @@ void display_startup()
|
||||
LLGLState::checkStates();
|
||||
LLGLState::checkTextureChannels();
|
||||
|
||||
gViewerWindow->handlePerFrameHover(); // Fix ui flicker.
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
LLGLSUIDefault gls_ui;
|
||||
gPipeline.disableLights();
|
||||
|
||||
@@ -110,6 +110,7 @@ BOOL LLViewerGesture::trigger(const std::string &trigger_string)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// private
|
||||
void LLViewerGesture::doTrigger( BOOL send_chat )
|
||||
{
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llviewerjoint.cpp
|
||||
* @brief Implementation of LLViewerJoint class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llviewerjoint.h
|
||||
* @brief Implementation of LLViewerJoint class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llviewerjointattachment.cpp
|
||||
* @brief Implementation of LLViewerJointAttachment class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -35,12 +29,12 @@
|
||||
#include "llviewerjointattachment.h"
|
||||
|
||||
#include "llagentconstants.h"
|
||||
|
||||
#include "llviewercontrol.h"
|
||||
#include "lldrawable.h"
|
||||
#include "llgl.h"
|
||||
#include "llhudtext.h"
|
||||
#include "llrender.h"
|
||||
#include "llvoavatar.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llvolume.h"
|
||||
#include "pipeline.h"
|
||||
#include "llspatialpartition.h"
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llviewerjointmesh.h
|
||||
* @brief Implementation of LLViewerJointMesh class
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorypanel.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llkeyboard.h"
|
||||
#include "llpanellogin.h"
|
||||
#include "llmenucommands.h"
|
||||
@@ -4189,18 +4190,18 @@ void handle_show_newest_map(void*)
|
||||
//
|
||||
// Major mode switching
|
||||
//
|
||||
void reset_view_final( BOOL proceed, void* );
|
||||
void reset_view_final( BOOL proceed );
|
||||
|
||||
void handle_reset_view()
|
||||
{
|
||||
if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) && gFloaterCustomize )
|
||||
{
|
||||
// Show dialog box if needed.
|
||||
gFloaterCustomize->askToSaveIfDirty( reset_view_final, NULL );
|
||||
gFloaterCustomize->askToSaveIfDirty( boost::bind(&reset_view_final, _1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
reset_view_final( TRUE, NULL );
|
||||
reset_view_final( true );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4214,7 +4215,7 @@ class LLViewResetView : public view_listener_t
|
||||
};
|
||||
|
||||
// Note: extra parameters allow this function to be called from dialog.
|
||||
void reset_view_final( BOOL proceed, void* )
|
||||
void reset_view_final( BOOL proceed )
|
||||
{
|
||||
if( !proceed )
|
||||
{
|
||||
@@ -8298,10 +8299,9 @@ void slow_mo_animations(void*)
|
||||
|
||||
void handle_dump_avatar_local_textures(void*)
|
||||
{
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
if( avatar )
|
||||
if( isAgentAvatarValid() )
|
||||
{
|
||||
avatar->dumpLocalTextures();
|
||||
gAgentAvatarp->dumpLocalTextures();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9062,12 +9062,11 @@ void handle_buy_currency_test(void*)
|
||||
|
||||
void handle_rebake_textures(void*)
|
||||
{
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
if (!avatar) return;
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
// Slam pending upload count to "unstick" things
|
||||
bool slam_for_debug = true;
|
||||
avatar->forceBakeAllTextures(slam_for_debug);
|
||||
gAgentAvatarp->forceBakeAllTextures(slam_for_debug);
|
||||
}
|
||||
|
||||
void toggle_visibility(void* user_data)
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <deque>
|
||||
|
||||
#include "llimagejpeg.h"
|
||||
#include "llagentui.h"
|
||||
#include "llanimationstates.h"
|
||||
#include "llaudioengine.h"
|
||||
#include "llavatarnamecache.h"
|
||||
@@ -122,6 +123,7 @@
|
||||
#include "lluploaddialog.h"
|
||||
#include "llviewercamera.h"
|
||||
#include "llviewerdisplay.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
#include "llviewergenericmessage.h"
|
||||
#include "llviewerinventory.h"
|
||||
#include "llviewerjoystick.h"
|
||||
@@ -954,8 +956,8 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
|
||||
|
||||
void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
|
||||
{
|
||||
std::vector<LLUUID>::const_iterator it = items.begin();
|
||||
std::vector<LLUUID>::const_iterator end = items.end();
|
||||
uuid_vec_t::const_iterator it = items.begin();
|
||||
uuid_vec_t::const_iterator end = items.end();
|
||||
LLInventoryItem* item;
|
||||
for(; it != end; ++it)
|
||||
{
|
||||
@@ -1153,7 +1155,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
||||
{
|
||||
LLChat chat;
|
||||
std::string log_message;
|
||||
S32 button = LLNotification::getSelectedOption(notification, response);
|
||||
S32 button = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
// For muting, we need to add the mute, then decline the offer.
|
||||
// This must be done here because:
|
||||
@@ -1177,7 +1179,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
|
||||
msg->addUUIDFast(_PREHASH_ID, mTransactionID);
|
||||
msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
|
||||
std::string name;
|
||||
gAgent.buildFullname(name);
|
||||
LLAgentUI::buildFullname(name);
|
||||
msg->addStringFast(_PREHASH_FromAgentName, name);
|
||||
msg->addStringFast(_PREHASH_Message, "");
|
||||
msg->addU32Fast(_PREHASH_ParentEstateID, 0);
|
||||
@@ -1573,7 +1575,7 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
|
||||
}
|
||||
else
|
||||
{
|
||||
option = LLNotification::getSelectedOption(notification, response);
|
||||
option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
}
|
||||
|
||||
LLUUID from_id = notification["payload"]["from_id"].asUUID();
|
||||
@@ -1604,7 +1606,7 @@ static LLNotificationFunctorRegistration lure_callback_reg("TeleportOffered", lu
|
||||
bool goto_url_callback(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
std::string url = notification["payload"]["url"].asString();
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
if(1 == option)
|
||||
{
|
||||
LLWeb::loadURL(url);
|
||||
@@ -1665,6 +1667,16 @@ static std::string clean_name_from_im(const std::string& name, EInstantMessage t
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void notification_display_name_callback(const LLUUID& id,
|
||||
const LLAvatarName& av_name,
|
||||
const std::string& name,
|
||||
LLSD& substitutions,
|
||||
const LLSD& payload)
|
||||
{
|
||||
substitutions["NAME"] = av_name.mDisplayName;
|
||||
LLNotificationsUtil::add(name, substitutions, payload);
|
||||
}
|
||||
void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
{
|
||||
if (gNoRender)
|
||||
@@ -2025,7 +2037,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
// if there is not a panel for this conversation (i.e. it is a new IM conversation
|
||||
// initiated by the other party) then...
|
||||
std::string my_name;
|
||||
gAgent.buildFullname(my_name);
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
std::string response = gSavedPerAccountSettings.getText("BusyModeResponse");
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
@@ -2211,7 +2223,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
|
||||
if (has_inventory)
|
||||
{
|
||||
info = new LLOfferInfo;
|
||||
info = new LLOfferInfo();
|
||||
|
||||
info->mIM = IM_GROUP_NOTICE;
|
||||
info->mFromID = from_id;
|
||||
@@ -2812,7 +2824,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
|
||||
send_generic_message("requestonlinenotification", strings);
|
||||
|
||||
args["NAME"] = name;
|
||||
LLNotificationsUtil::add("FriendshipAccepted", args);
|
||||
LLSD payload;
|
||||
payload["from_id"] = from_id;
|
||||
LLAvatarNameCache::get(from_id, boost::bind(¬ification_display_name_callback,
|
||||
_1,
|
||||
_2,
|
||||
"FriendshipAccepted",
|
||||
args,
|
||||
payload));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2836,7 +2855,7 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id)
|
||||
if (gAgent.getBusy())
|
||||
{
|
||||
std::string my_name;
|
||||
gAgent.buildFullname(my_name);
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
std::string response = gSavedPerAccountSettings.getText("BusyModeResponse");
|
||||
pack_instant_message(
|
||||
gMessageSystem,
|
||||
@@ -2854,7 +2873,7 @@ void busy_message (LLMessageSystem* msg, LLUUID from_id)
|
||||
|
||||
bool callingcard_offer_callback(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLUUID fid;
|
||||
LLUUID from_id;
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
@@ -3817,6 +3836,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
||||
|
||||
M7WindlightInterface::getInstance()->receiveReset();
|
||||
|
||||
// Make sure we're standing
|
||||
gAgent.standUp();
|
||||
|
||||
// now, use the circuit info to tell simulator about us!
|
||||
LL_INFOS("Messaging") << "process_teleport_finish() Enabling "
|
||||
<< sim_host << " with code " << msg->mOurCircuitCode << LL_ENDL;
|
||||
@@ -3950,7 +3972,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
|
||||
gAgent.sendAgentSetAppearance();
|
||||
|
||||
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
|
||||
if ( (gAgentAvatarp) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
|
||||
if ( (isAgentAvatarValid()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) )
|
||||
// [/RLVa:KB]
|
||||
// if (avatarp)
|
||||
{
|
||||
@@ -4990,9 +5012,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
|
||||
BOOL force_mouselook;
|
||||
mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook);
|
||||
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
|
||||
if (avatar && dist_vec_squared(camera_eye, camera_at) > 0.0001f)
|
||||
if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > 0.0001f)
|
||||
{
|
||||
gAgentCamera.setSitCamera(sitObjectID, camera_eye, camera_at);
|
||||
}
|
||||
@@ -5006,7 +5026,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
|
||||
if (object)
|
||||
{
|
||||
LLVector3 sit_spot = object->getPositionAgent() + (sitPosition * object->getRotation());
|
||||
if (!use_autopilot || (avatar && avatar->isSitting() && avatar->getRoot() == object->getRoot()))
|
||||
if (!use_autopilot || isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot())
|
||||
{
|
||||
//we're already sitting on this object, so don't autopilot
|
||||
}
|
||||
@@ -5273,7 +5293,9 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
|
||||
S32 credit = 0;
|
||||
S32 committed = 0;
|
||||
std::string desc;
|
||||
LLUUID tid;
|
||||
|
||||
msg->getUUID("MoneyData", "TransactionID", tid);
|
||||
msg->getS32("MoneyData", "MoneyBalance", balance);
|
||||
msg->getS32("MoneyData", "SquareMetersCredit", credit);
|
||||
msg->getS32("MoneyData", "SquareMetersCommitted", committed);
|
||||
@@ -5303,9 +5325,6 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
|
||||
gStatusBar->setLandCredit(credit);
|
||||
gStatusBar->setLandCommitted(committed);
|
||||
}
|
||||
|
||||
LLUUID tid;
|
||||
msg->getUUID("MoneyData", "TransactionID", tid);
|
||||
static std::deque<LLUUID> recent;
|
||||
if(!desc.empty() && gSavedSettings.getBOOL("NotifyMoneyChange")
|
||||
&& (std::find(recent.rbegin(), recent.rend(), tid) == recent.rend()))
|
||||
@@ -5337,7 +5356,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
|
||||
|
||||
bool handle_special_notification_callback(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
if (0 == option)
|
||||
{
|
||||
@@ -5358,18 +5377,18 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
|
||||
llsdBlock["REGIONMATURITY"] = LLViewerRegion::accessToString(regionAccess);
|
||||
|
||||
// we're going to throw the LLSD in there in case anyone ever wants to use it
|
||||
LLNotifications::instance().add(notificationID+"_Notify", llsdBlock);
|
||||
LLNotificationsUtil::add(notificationID+"_Notify", llsdBlock);
|
||||
|
||||
if (regionAccess == SIM_ACCESS_MATURE)
|
||||
{
|
||||
if (gAgent.isTeen())
|
||||
{
|
||||
LLNotifications::instance().add(notificationID+"_KB", llsdBlock);
|
||||
LLNotificationsUtil::add(notificationID+"_KB", llsdBlock);
|
||||
return true;
|
||||
}
|
||||
else if (gAgent.prefersPG())
|
||||
{
|
||||
LLNotifications::instance().add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
|
||||
LLNotificationsUtil::add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -5377,12 +5396,12 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
|
||||
{
|
||||
if (!gAgent.isAdult())
|
||||
{
|
||||
LLNotifications::instance().add(notificationID+"_KB", llsdBlock);
|
||||
LLNotificationsUtil::add(notificationID+"_KB", llsdBlock);
|
||||
return true;
|
||||
}
|
||||
else if (gAgent.prefersPG() || gAgent.prefersMature())
|
||||
{
|
||||
LLNotifications::instance().add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
|
||||
LLNotificationsUtil::add(notificationID+"_Change", llsdBlock, llsdBlock, handle_special_notification_callback);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -5442,7 +5461,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
|
||||
}
|
||||
}
|
||||
|
||||
LLNotifications::instance().add(notificationID, llsdBlock);
|
||||
LLNotificationsUtil::add(notificationID, llsdBlock);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -5508,14 +5527,14 @@ void process_alert_core(const std::string& message, BOOL modal)
|
||||
// Allow the server to spawn a named alert so that server alerts can be
|
||||
// translated out of English.
|
||||
std::string alert_name(message.substr(ALERT_PREFIX.length()));
|
||||
LLNotifications::instance().add(alert_name);
|
||||
LLNotificationsUtil::add(alert_name);
|
||||
}
|
||||
else if (message.find(NOTIFY_PREFIX) == 0)
|
||||
{
|
||||
// Allow the server to spawn a named notification so that server notifications can be
|
||||
// translated out of English.
|
||||
std::string notify_name(message.substr(NOTIFY_PREFIX.length()));
|
||||
LLNotifications::instance().add(notify_name);
|
||||
LLNotificationsUtil::add(notify_name);
|
||||
}
|
||||
else if (message[0] == '/')
|
||||
{
|
||||
@@ -5784,7 +5803,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
|
||||
|
||||
bool script_question_cb(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
LLMessageSystem *msg = gMessageSystem;
|
||||
S32 orig = notification["payload"]["questions"].asInteger();
|
||||
S32 new_questions = orig;
|
||||
@@ -5836,7 +5855,7 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
return (notification->getPayload()["item_id"].asUUID() == blocked_id);
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
private:
|
||||
const LLUUID& blocked_id;
|
||||
@@ -5848,7 +5867,7 @@ bool script_question_cb(const LLSD& notification, const LLSD& response)
|
||||
if (response["Details"])
|
||||
{
|
||||
// respawn notification...
|
||||
LLNotifications::instance().add(notification["name"], notification["substitutions"], notification["payload"]);
|
||||
LLNotificationsUtil::add(notification["name"], notification["substitutions"], notification["payload"]);
|
||||
|
||||
// ...with description on top
|
||||
LLNotificationsUtil::add("DebitPermissionDetails");
|
||||
@@ -5884,7 +5903,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
|
||||
// so we'll reuse the same namespace for both throttle types.
|
||||
std::string throttle_name = owner_name;
|
||||
std::string self_name;
|
||||
gAgent.getName( self_name );
|
||||
LLAgentUI::buildFullname( self_name );
|
||||
if( owner_name == self_name )
|
||||
{
|
||||
throttle_name = taskid.getString();
|
||||
@@ -5920,7 +5939,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
|
||||
S32 count = 0;
|
||||
LLSD args;
|
||||
args["OBJECTNAME"] = object_name;
|
||||
args["NAME"] = owner_name;
|
||||
args["NAME"] = LLCacheName::cleanFullName(owner_name);
|
||||
|
||||
// check the received permission flags against each permission
|
||||
for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++)
|
||||
@@ -5975,7 +5994,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
|
||||
//if (gSavedSettings.getBOOL("PermissionsCautionEnabled"))
|
||||
{
|
||||
// display the caution permissions prompt
|
||||
LLNotifications::instance().add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload);
|
||||
LLNotificationsUtil::add(caution ? "ScriptQuestionCaution" : "ScriptQuestion", args, payload);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6254,7 +6273,7 @@ void send_simple_im(const LLUUID& to_id,
|
||||
const LLUUID& id)
|
||||
{
|
||||
std::string my_name;
|
||||
gAgent.buildFullname(my_name);
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
send_improved_im(to_id,
|
||||
my_name,
|
||||
message,
|
||||
@@ -6275,7 +6294,7 @@ void send_group_notice(const LLUUID& group_id,
|
||||
// This will mean converting the item to a binary bucket,
|
||||
// and the subject/message into a single field.
|
||||
std::string my_name;
|
||||
gAgent.buildFullname(my_name);
|
||||
LLAgentUI::buildFullname(my_name);
|
||||
|
||||
// Combine subject + message into a single string.
|
||||
std::ostringstream subject_and_message;
|
||||
@@ -6646,7 +6665,7 @@ std::vector<LLSD> gLoadUrlList;
|
||||
|
||||
bool callback_load_url(const LLSD& notification, const LLSD& response)
|
||||
{
|
||||
S32 option = LLNotification::getSelectedOption(notification, response);
|
||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||
|
||||
if (0 == option)
|
||||
{
|
||||
|
||||
@@ -33,20 +33,26 @@
|
||||
#ifndef LL_LLVIEWERMESSAGE_H
|
||||
#define LL_LLVIEWERMESSAGE_H
|
||||
|
||||
#include "llassettype.h"
|
||||
#include "llinstantmessage.h"
|
||||
#include "llpointer.h"
|
||||
#include "lltransactiontypes.h"
|
||||
#include "lluuid.h"
|
||||
#include "llchat.h"
|
||||
#include "message.h"
|
||||
#include "stdenums.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llchat.h"
|
||||
|
||||
//
|
||||
// Forward declarations
|
||||
//
|
||||
class LLColor4;
|
||||
class LLViewerObject;
|
||||
class LLInventoryObject;
|
||||
class LLInventoryItem;
|
||||
class LLMeanCollisionData;
|
||||
class LLMessageSystem;
|
||||
class LLVFS;
|
||||
class LLViewerObject;
|
||||
class LLViewerRegion;
|
||||
|
||||
//
|
||||
|
||||
@@ -1567,7 +1567,8 @@ void LLViewerTextEditor::copyInventory(const LLInventoryItem* item, U32 callback
|
||||
{
|
||||
copy_inventory_from_notecard(mObjectID,
|
||||
mNotecardInventoryID,
|
||||
item, callback_id);
|
||||
item,
|
||||
callback_id);
|
||||
}
|
||||
|
||||
bool LLViewerTextEditor::hasEmbeddedInventory()
|
||||
|
||||
@@ -119,12 +119,6 @@ LLViewerVisualParam::LLViewerVisualParam()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
//=============================================================================
|
||||
// These virtual functions should always be overridden,
|
||||
// but are included here for use as templates
|
||||
//=============================================================================
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// setInfo()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -140,6 +134,12 @@ BOOL LLViewerVisualParam::setInfo(LLViewerVisualParamInfo *info)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
//=============================================================================
|
||||
// These virtual functions should always be overridden,
|
||||
// but are included here for use as templates
|
||||
//=============================================================================
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// parseData()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @file llviewervisualparam.h
|
||||
* @brief viewer side visual params (with data file parsing)
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
@@ -37,6 +31,8 @@
|
||||
#include "llstring.h"
|
||||
#include "llvisualparam.h"
|
||||
|
||||
class LLWearable;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLViewerVisualParamInfo
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llfloateravatarlist.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llcallbacklist.h"
|
||||
#include "llfloaterbeacons.h"
|
||||
@@ -33,6 +34,7 @@
|
||||
#include "llviewermenu.h"
|
||||
#include "llviewermessage.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llagentcamera.h"
|
||||
@@ -589,9 +591,24 @@ void RlvHandler::onLoginComplete()
|
||||
RlvSettings::updateLoginLastLocation();
|
||||
#endif // RLV_EXTENSION_STARTLOCATION
|
||||
|
||||
LLViewerParcelMgr::getInstance()->setTeleportFailedCallback(boost::bind(&RlvHandler::onTeleportFailed, this));
|
||||
LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(boost::bind(&RlvHandler::onTeleportFinished, this, _1));
|
||||
|
||||
processRetainedCommands();
|
||||
}
|
||||
|
||||
// Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
|
||||
void RlvHandler::onTeleportFailed()
|
||||
{
|
||||
setCanCancelTp(true);
|
||||
}
|
||||
|
||||
// Checked: 2010-04-05 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
|
||||
void RlvHandler::onTeleportFinished(const LLVector3d& posArrival)
|
||||
{
|
||||
setCanCancelTp(true);
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// String/chat censoring functions
|
||||
//
|
||||
@@ -932,6 +949,9 @@ BOOL RlvHandler::setEnabled(BOOL fEnable)
|
||||
|
||||
if (fEnable)
|
||||
{
|
||||
RLV_INFOS << "Enabling Restrained Love API support - " << RlvStrings::getVersion() << RLV_ENDL;
|
||||
m_fEnabled = TRUE;
|
||||
|
||||
// Initialize the command lookup table
|
||||
RlvCommand::initLookupTable();
|
||||
|
||||
@@ -941,11 +961,11 @@ BOOL RlvHandler::setEnabled(BOOL fEnable)
|
||||
|
||||
gRlvHandler.addCommandHandler(new RlvExtGetSet());
|
||||
|
||||
// Fetch shared inventory if we're enabled after logon
|
||||
if (LLStartUp::getStartupState() >= STATE_CLEANUP)
|
||||
RlvInventory::instance().fetchSharedInventory();
|
||||
|
||||
m_fEnabled = TRUE;
|
||||
// Make sure we get notified when login is successful
|
||||
if (LLStartUp::getStartupState() < STATE_STARTED)
|
||||
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&RlvHandler::onLoginComplete, &gRlvHandler));
|
||||
else
|
||||
gRlvHandler.onLoginComplete();
|
||||
}
|
||||
|
||||
#ifdef RLV_ADVANCED_MENU
|
||||
@@ -1015,7 +1035,8 @@ ERlvCmdRet RlvHandler::processAddRemCommand(const RlvCommand& rlvCmd)
|
||||
VERIFY_OPTION_REF( (rlvCmdOption.isEmpty()) || (rlvCmdOption.isWearableType()) );
|
||||
|
||||
// We need to flush any queued force-wear commands before changing the restrictions
|
||||
RlvForceWear::instance().done();
|
||||
if (RlvForceWear::instanceExists())
|
||||
RlvForceWear::instance().done();
|
||||
|
||||
ERlvLockMask eLock = (RLV_BHVR_ADDOUTFIT == eBhvr) ? RLV_LOCK_ADD : RLV_LOCK_REMOVE;
|
||||
for (int idxType = 0; idxType < LLWearableType::WT_COUNT; idxType++)
|
||||
@@ -1419,7 +1440,8 @@ ERlvCmdRet RlvHandler::onAddRemAttach(const RlvCommand& rlvCmd, bool& fRefCount)
|
||||
return RLV_RET_FAILED;
|
||||
|
||||
// We need to flush any queued force-wear commands before changing the restrictions
|
||||
RlvForceWear::instance().done();
|
||||
if (RlvForceWear::instanceExists())
|
||||
RlvForceWear::instance().done();
|
||||
|
||||
ERlvLockMask eLock = (RLV_BHVR_REMATTACH == rlvCmd.getBehaviourType()) ? RLV_LOCK_REMOVE : RLV_LOCK_ADD;
|
||||
for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin();
|
||||
@@ -1445,7 +1467,8 @@ ERlvCmdRet RlvHandler::onAddRemDetach(const RlvCommand& rlvCmd, bool& fRefCount)
|
||||
RLV_ASSERT(RLV_BHVR_DETACH == rlvCmd.getBehaviourType());
|
||||
|
||||
// We need to flush any queued force-wear commands before changing the restrictions
|
||||
RlvForceWear::instance().done();
|
||||
if (RlvForceWear::instanceExists())
|
||||
RlvForceWear::instance().done();
|
||||
|
||||
if (rlvCmd.getOption().empty()) // @detach=n|y - RLV_LOCK_REMOVE locks an attachment *object*
|
||||
{
|
||||
|
||||
@@ -143,6 +143,8 @@ public:
|
||||
bool onGC();
|
||||
void onLoginComplete();
|
||||
void onSitOrStand(bool fSitting);
|
||||
void onTeleportFailed();
|
||||
void onTeleportFinished(const LLVector3d& posArrival);
|
||||
static void onIdleStartup(void* pParam);
|
||||
|
||||
/*
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentwearables.h"
|
||||
#include "llattachmentsmgr.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llfloaterwindlight.h"
|
||||
@@ -29,11 +31,11 @@
|
||||
#include "llvoavatar.h"
|
||||
#include "llwearablelist.h"
|
||||
#include "llwlparammanager.h"
|
||||
#include "llagentwearables.h"
|
||||
|
||||
|
||||
#include "rlvhelper.h"
|
||||
#include "rlvinventory.h"
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvinventory.h"
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ void RlvAttachmentLocks::addAttachmentLock(const LLUUID& idAttachObj, const LLUU
|
||||
#endif // RLV_RELEASE
|
||||
|
||||
m_AttachObjRem.insert(std::pair<LLUUID, LLUUID>(idAttachObj, idRlvObj));
|
||||
if(LLViewerObject *pObj = gObjectList.findObject(idAttachObj)) //OK
|
||||
if(LLViewerObject *pObj = gObjectList.findObject(idAttachObj)) //Update labels to (locked)
|
||||
{
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, pObj->getAttachmentItemID());
|
||||
gInventory.notifyObservers();
|
||||
@@ -206,7 +206,7 @@ void RlvAttachmentLocks::addAttachmentPointLock(S32 idxAttachPt, const LLUUID& i
|
||||
{
|
||||
m_AttachPtRem.insert(std::pair<S32, LLUUID>(idxAttachPt, idRlvObj));
|
||||
LLVOAvatar* pAvatar = gAgentAvatarp;
|
||||
if (pAvatar)
|
||||
if (pAvatar) //Update labels to (locked)
|
||||
{
|
||||
bool need_update = false;
|
||||
LLVOAvatar::attachment_map_t::iterator iter = pAvatar->mAttachmentPoints.find(idxAttachPt);
|
||||
@@ -343,7 +343,7 @@ void RlvAttachmentLocks::removeAttachmentLock(const LLUUID& idAttachObj, const L
|
||||
if (idRlvObj == itAttachObj->second)
|
||||
{
|
||||
m_AttachObjRem.erase(itAttachObj);
|
||||
if(LLViewerObject *pObj = gObjectList.findObject(idAttachObj)) //OK
|
||||
if(LLViewerObject *pObj = gObjectList.findObject(idAttachObj)) //Update labels to (locked)
|
||||
{
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, pObj->getAttachmentItemID());
|
||||
gInventory.notifyObservers();
|
||||
@@ -378,7 +378,7 @@ void RlvAttachmentLocks::removeAttachmentPointLock(S32 idxAttachPt, const LLUUID
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(removed_entry)
|
||||
if(removed_entry) //Update labels to (locked)
|
||||
{
|
||||
if(m_AttachPtRem.find(idxAttachPt) == m_AttachPtRem.end())
|
||||
{
|
||||
@@ -880,7 +880,7 @@ void RlvWearableLocks::addWearableTypeLock(LLWearableType::EType eType, const LL
|
||||
{
|
||||
m_WearableTypeRem.insert(std::pair<LLWearableType::EType, LLUUID>(eType, idRlvObj));
|
||||
LLUUID item_id = gAgentWearables.getWearableItemID(eType, 0); // TODO: MULTI-WEARABLE
|
||||
if(item_id.notNull())
|
||||
if(item_id.notNull()) //Update labels to (locked)
|
||||
{
|
||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
|
||||
gInventory.notifyObservers();
|
||||
@@ -971,7 +971,7 @@ void RlvWearableLocks::removeWearableTypeLock(LLWearableType::EType eType, const
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(removed_entry)
|
||||
if(removed_entry) //Update labels to (locked)
|
||||
{
|
||||
if(m_WearableTypeRem.find(eType) == m_WearableTypeRem.end())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user