diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-20 19:24:07 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-20 19:24:07 +0200 |
commit | d0c1593d85cd26ad822d31e21df7a1864d66541c (patch) | |
tree | 30ceb3cfc19ccb36b7bcc7f0e5a2ad3efdd38747 /indra/newview/llsidepanelinventorysubpanel.cpp | |
parent | 9d64bf132e27739dedeca17a1d952655c6b52ac3 (diff) | |
parent | 0c468557b9e38ec4be201fa991499ed095a4d8c3 (diff) |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llsidepanelinventorysubpanel.cpp')
-rw-r--r-- | indra/newview/llsidepanelinventorysubpanel.cpp | 310 |
1 files changed, 155 insertions, 155 deletions
diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp index 162198f1c5..23931defdd 100644 --- a/indra/newview/llsidepanelinventorysubpanel.cpp +++ b/indra/newview/llsidepanelinventorysubpanel.cpp @@ -1,155 +1,155 @@ -/**
- * @file llsidepanelinventorysubpanel.cpp
- * @brief A floater which shows an inventory item's properties.
- *
- * $LicenseInfo:firstyear=2002&license=viewergpl$
- *
- * Copyright (c) 2002-2009, Linden Research, Inc.
- *
- * 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
- *
- * 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
- *
- * 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.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-#include "llsidepanelinventorysubpanel.h"
-
-#include "roles_constants.h"
-
-#include "llagent.h"
-#include "llavataractions.h"
-#include "llbutton.h"
-#include "llfloaterreg.h"
-#include "llgroupactions.h"
-#include "llinventorymodel.h"
-#include "lllineeditor.h"
-#include "llradiogroup.h"
-#include "llviewercontrol.h"
-#include "llviewerinventory.h"
-#include "llviewerobjectlist.h"
-
-
-///----------------------------------------------------------------------------
-/// Class LLSidepanelInventorySubpanel
-///----------------------------------------------------------------------------
-
-// Default constructor
-LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel()
- : LLPanel(),
- mIsDirty(TRUE),
- mIsEditing(FALSE),
- mEditBtn(NULL),
- mCancelBtn(NULL),
- mSaveBtn(NULL)
-{
-}
-
-// Destroys the object
-LLSidepanelInventorySubpanel::~LLSidepanelInventorySubpanel()
-{
-}
-
-// virtual
-BOOL LLSidepanelInventorySubpanel::postBuild()
-{
- mEditBtn = getChild<LLButton>("edit_btn");
- mEditBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onEditButtonClicked, this));
-
- mSaveBtn = getChild<LLButton>("save_btn");
- mSaveBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onSaveButtonClicked, this));
-
- mCancelBtn = getChild<LLButton>("cancel_btn");
- mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this));
- return TRUE;
-}
-
-void LLSidepanelInventorySubpanel::setVisible(BOOL visible)
-{
- if (visible)
- {
- dirty();
- }
- LLPanel::setVisible(visible);
-}
-
-void LLSidepanelInventorySubpanel::setIsEditing(BOOL edit)
-{
- mIsEditing = edit;
- mIsDirty = TRUE;
-}
-
-BOOL LLSidepanelInventorySubpanel::getIsEditing() const
-{
- return mIsEditing;
-}
-
-void LLSidepanelInventorySubpanel::reset()
-{
- mIsDirty = TRUE;
-}
-
-void LLSidepanelInventorySubpanel::draw()
-{
- if (mIsDirty)
- {
- mIsDirty = FALSE;
- refresh();
- updateVerbs();
- }
-
- LLPanel::draw();
-}
-
-void LLSidepanelInventorySubpanel::dirty()
-{
- mIsDirty = TRUE;
- setIsEditing(FALSE);
-}
-
-void LLSidepanelInventorySubpanel::updateVerbs()
-{
- mEditBtn->setVisible(!mIsEditing);
- mSaveBtn->setVisible(mIsEditing);
- mCancelBtn->setVisible(mIsEditing);
-}
-
-void LLSidepanelInventorySubpanel::onEditButtonClicked()
-{
- setIsEditing(TRUE);
- refresh();
- updateVerbs();
-}
-
-void LLSidepanelInventorySubpanel::onSaveButtonClicked()
-{
- save();
- setIsEditing(FALSE);
- refresh();
- updateVerbs();
-}
-
-void LLSidepanelInventorySubpanel::onCancelButtonClicked()
-{
- setIsEditing(FALSE);
- refresh();
- updateVerbs();
-}
+/** + * @file llsidepanelinventorysubpanel.cpp + * @brief A floater which shows an inventory item's properties. + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * 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 + * + * 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 + * + * 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. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llsidepanelinventorysubpanel.h" + +#include "roles_constants.h" + +#include "llagent.h" +#include "llavataractions.h" +#include "llbutton.h" +#include "llfloaterreg.h" +#include "llgroupactions.h" +#include "llinventorymodel.h" +#include "lllineeditor.h" +#include "llradiogroup.h" +#include "llviewercontrol.h" +#include "llviewerinventory.h" +#include "llviewerobjectlist.h" + + +///---------------------------------------------------------------------------- +/// Class LLSidepanelInventorySubpanel +///---------------------------------------------------------------------------- + +// Default constructor +LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel() + : LLPanel(), + mIsDirty(TRUE), + mIsEditing(FALSE), + mEditBtn(NULL), + mCancelBtn(NULL), + mSaveBtn(NULL) +{ +} + +// Destroys the object +LLSidepanelInventorySubpanel::~LLSidepanelInventorySubpanel() +{ +} + +// virtual +BOOL LLSidepanelInventorySubpanel::postBuild() +{ + mEditBtn = getChild<LLButton>("edit_btn"); + mEditBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onEditButtonClicked, this)); + + mSaveBtn = getChild<LLButton>("save_btn"); + mSaveBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onSaveButtonClicked, this)); + + mCancelBtn = getChild<LLButton>("cancel_btn"); + mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this)); + return TRUE; +} + +void LLSidepanelInventorySubpanel::setVisible(BOOL visible) +{ + if (visible) + { + dirty(); + } + LLPanel::setVisible(visible); +} + +void LLSidepanelInventorySubpanel::setIsEditing(BOOL edit) +{ + mIsEditing = edit; + mIsDirty = TRUE; +} + +BOOL LLSidepanelInventorySubpanel::getIsEditing() const +{ + return mIsEditing; +} + +void LLSidepanelInventorySubpanel::reset() +{ + mIsDirty = TRUE; +} + +void LLSidepanelInventorySubpanel::draw() +{ + if (mIsDirty) + { + mIsDirty = FALSE; + refresh(); + updateVerbs(); + } + + LLPanel::draw(); +} + +void LLSidepanelInventorySubpanel::dirty() +{ + mIsDirty = TRUE; + setIsEditing(FALSE); +} + +void LLSidepanelInventorySubpanel::updateVerbs() +{ + mEditBtn->setVisible(!mIsEditing); + mSaveBtn->setVisible(mIsEditing); + mCancelBtn->setVisible(mIsEditing); +} + +void LLSidepanelInventorySubpanel::onEditButtonClicked() +{ + setIsEditing(TRUE); + refresh(); + updateVerbs(); +} + +void LLSidepanelInventorySubpanel::onSaveButtonClicked() +{ + save(); + setIsEditing(FALSE); + refresh(); + updateVerbs(); +} + +void LLSidepanelInventorySubpanel::onCancelButtonClicked() +{ + setIsEditing(FALSE); + refresh(); + updateVerbs(); +} |