summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-11-23 12:11:53 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-11-23 12:11:53 -0800
commit943789b53ac3f2750cb71dca6facc0de7fa39539 (patch)
tree124a3b6ae634b8128e9a007403d84ae21de230fd /indra/newview
parent249abaa62ba61a69ad669507c92d3a373c8e34f3 (diff)
SH-2710 FIX -- Removed calls to getChild happening every frame and during idle calls.
Reviewed by davep.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldebugview.cpp39
-rw-r--r--indra/newview/lldebugview.h6
-rw-r--r--indra/newview/llfloaterwebcontent.cpp40
-rw-r--r--indra/newview/llfloaterwebcontent.h6
-rw-r--r--indra/newview/llnearbychatbar.cpp17
-rw-r--r--indra/newview/llnearbychatbar.h7
-rw-r--r--indra/newview/llnearbychathandler.cpp11
-rw-r--r--indra/newview/llscreenchannel.cpp42
-rw-r--r--indra/newview/llscreenchannel.h7
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp159
-rw-r--r--indra/newview/llsidepaneltaskinfo.h40
-rw-r--r--indra/newview/llstatusbar.cpp5
-rw-r--r--indra/newview/llstatusbar.h3
13 files changed, 263 insertions, 119 deletions
diff --git a/indra/newview/lldebugview.cpp b/indra/newview/lldebugview.cpp
index ba511a3693..92ac336d0d 100644
--- a/indra/newview/lldebugview.cpp
+++ b/indra/newview/lldebugview.cpp
@@ -55,9 +55,30 @@ LLDebugView* gDebugView = NULL;
static LLDefaultChildRegistry::Register<LLDebugView> r("debug_view");
LLDebugView::LLDebugView(const LLDebugView::Params& p)
-: LLView(p)
+: LLView(p),
+ mFastTimerView(NULL),
+ mMemoryView(NULL),
+ mDebugConsolep(NULL),
+ mFloaterSnapRegion(NULL)
{}
+LLDebugView::~LLDebugView()
+{
+ // These have already been deleted. Fix the globals appropriately.
+ gDebugView = NULL;
+ gTextureView = NULL;
+ gSceneView = NULL;
+ gTextureSizeView = NULL;
+ gTextureCategoryView = NULL;
+}
+
+BOOL LLDebugView::postBuild()
+{
+ mFloaterSnapRegion = getRootView()->getChildView("floater_snap_region");
+
+ return TRUE;
+}
+
void LLDebugView::init()
{
LLRect r;
@@ -109,8 +130,6 @@ void LLDebugView::init()
addChild(gTextureView);
//gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE);
-
-
if(gAuditTexture)
{
@@ -136,22 +155,10 @@ void LLDebugView::init()
}
}
-
-LLDebugView::~LLDebugView()
-{
- // These have already been deleted. Fix the globals appropriately.
- gDebugView = NULL;
- gTextureView = NULL;
- gSceneView = NULL;
- gTextureSizeView = NULL;
- gTextureCategoryView = NULL;
-}
-
void LLDebugView::draw()
{
- LLView* floater_snap_region = getRootView()->getChildView("floater_snap_region");
LLRect debug_rect;
- floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &debug_rect, getParent());
+ mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &debug_rect, getParent());
setShape(debug_rect);
LLView::draw();
diff --git a/indra/newview/lldebugview.h b/indra/newview/lldebugview.h
index 907a42c981..33d6a7394f 100644
--- a/indra/newview/lldebugview.h
+++ b/indra/newview/lldebugview.h
@@ -51,17 +51,21 @@ public:
changeDefault(mouse_opaque, false);
}
};
+
LLDebugView(const Params&);
~LLDebugView();
+ BOOL postBuild();
+
void init();
void draw();
-
+
void setStatsVisible(BOOL visible);
LLFastTimerView* mFastTimerView;
LLMemoryView* mMemoryView;
LLConsole* mDebugConsolep;
+ LLView* mFloaterSnapRegion;
};
extern LLDebugView* gDebugView;
diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp
index f410c31f44..02f1899e6e 100644
--- a/indra/newview/llfloaterwebcontent.cpp
+++ b/indra/newview/llfloaterwebcontent.cpp
@@ -55,6 +55,15 @@ LLFloaterWebContent::_Params::_Params()
LLFloaterWebContent::LLFloaterWebContent( const Params& params )
: LLFloater( params ),
LLInstanceTracker<LLFloaterWebContent, std::string>(params.id()),
+ mWebBrowser(NULL),
+ mAddressCombo(NULL),
+ mSecureLockIcon(NULL),
+ mStatusBarText(NULL),
+ mStatusBarProgress(NULL),
+ mBtnBack(NULL),
+ mBtnForward(NULL),
+ mBtnReload(NULL),
+ mBtnStop(NULL),
mUUID(params.id()),
mShowPageTitle(params.show_page_title)
{
@@ -74,11 +83,16 @@ BOOL LLFloaterWebContent::postBuild()
mStatusBarText = getChild< LLTextBox >( "statusbartext" );
mStatusBarProgress = getChild<LLProgressBar>("statusbarprogress" );
+ mBtnBack = getChildView( "back" );
+ mBtnForward = getChildView( "forward" );
+ mBtnReload = getChildView( "reload" );
+ mBtnStop = getChildView( "stop" );
+
// observe browser events
mWebBrowser->addObserver( this );
// these buttons are always enabled
- getChildView("reload")->setEnabled( true );
+ mBtnReload->setEnabled( true );
getChildView("popexternal")->setEnabled( true );
// cache image for secure browsing
@@ -276,8 +290,8 @@ void LLFloaterWebContent::onClose(bool app_quitting)
void LLFloaterWebContent::draw()
{
// this is asynchronous so we need to keep checking
- getChildView( "back" )->setEnabled( mWebBrowser->canNavigateBack() );
- getChildView( "forward" )->setEnabled( mWebBrowser->canNavigateForward() );
+ mBtnBack->setEnabled( mWebBrowser->canNavigateBack() );
+ mBtnForward->setEnabled( mWebBrowser->canNavigateForward() );
LLFloater::draw();
}
@@ -297,12 +311,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
else if(event == MEDIA_EVENT_NAVIGATE_BEGIN)
{
// flags are sent with this event
- getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
- getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+ mBtnBack->setEnabled( self->getHistoryBackAvailable() );
+ mBtnForward->setEnabled( self->getHistoryForwardAvailable() );
// toggle visibility of these buttons based on browser state
- getChildView("reload")->setVisible( false );
- getChildView("stop")->setVisible( true );
+ mBtnReload->setVisible( false );
+ mBtnStop->setVisible( true );
// turn "on" progress bar now we're about to start loading
mStatusBarProgress->setVisible( true );
@@ -310,12 +324,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
else if(event == MEDIA_EVENT_NAVIGATE_COMPLETE)
{
// flags are sent with this event
- getChildView("back")->setEnabled( self->getHistoryBackAvailable() );
- getChildView("forward")->setEnabled( self->getHistoryForwardAvailable() );
+ mBtnBack->setEnabled( self->getHistoryBackAvailable() );
+ mBtnForward->setEnabled( self->getHistoryForwardAvailable() );
// toggle visibility of these buttons based on browser state
- getChildView("reload")->setVisible( true );
- getChildView("stop")->setVisible( false );
+ mBtnReload->setVisible( true );
+ mBtnStop->setVisible( false );
// turn "off" progress bar now we're loaded
mStatusBarProgress->setVisible( false );
@@ -421,8 +435,8 @@ void LLFloaterWebContent::onClickStop()
// still should happen when we catch the navigate complete event
// but sometimes (don't know why) that event isn't sent from Qt
// and we ghetto a point where the stop button stays active.
- getChildView("reload")->setVisible( true );
- getChildView("stop")->setVisible( false );
+ mBtnReload->setVisible( true );
+ mBtnStop->setVisible( false );
}
void LLFloaterWebContent::onEnterAddress()
diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h
index 6fc66d1ad8..0340eedd93 100644
--- a/indra/newview/llfloaterwebcontent.h
+++ b/indra/newview/llfloaterwebcontent.h
@@ -97,6 +97,12 @@ protected:
LLIconCtrl* mSecureLockIcon;
LLTextBox* mStatusBarText;
LLProgressBar* mStatusBarProgress;
+
+ LLView* mBtnBack;
+ LLView* mBtnForward;
+ LLView* mBtnReload;
+ LLView* mBtnStop;
+
std::string mCurrentURL;
std::string mUUID;
bool mShowPageTitle;
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 4674c85324..701fdf43c7 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -70,9 +70,14 @@ static LLChatTypeTrigger sChatTypeTriggers[] = {
};
LLNearbyChatBar::LLNearbyChatBar(const LLSD& key)
- : LLFloater(key),
- mChatBox(NULL)
-{ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
+: LLFloater(key),
+ mChatBox(NULL),
+ mNearbyChat(NULL),
+ mOutputMonitor(NULL),
+ mSpeakerMgr(NULL),
+ mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)
+{
+ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
}
//virtual
@@ -94,6 +99,7 @@ BOOL LLNearbyChatBar::postBuild()
mChatBox->setEnableLineHistory(TRUE);
mChatBox->setFont(LLViewerChat::getChatFont());
+ mNearbyChat = getChildView("nearby_chat");
LLUICtrl* show_btn = getChild<LLUICtrl>("show_nearby_chat");
show_btn->setCommitCallback(boost::bind(&LLNearbyChatBar::onToggleNearbyChatPanel, this));
@@ -104,8 +110,6 @@ BOOL LLNearbyChatBar::postBuild()
// Register for font change notifications
LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
- mExpandedHeight = COLLAPSED_HEIGHT + EXPANDED_HEIGHT;
-
enableResizeCtrls(true, true, false);
return TRUE;
@@ -115,8 +119,7 @@ bool LLNearbyChatBar::applyRectControl()
{
bool rect_controlled = LLFloater::applyRectControl();
- LLView* nearby_chat = getChildView("nearby_chat");
- if (!nearby_chat->getVisible())
+ if (!mNearbyChat->getVisible())
{
reshape(getRect().getWidth(), getMinHeight());
enableResizeCtrls(true, true, false);
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index e9734899b3..c2f57dc4ca 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -84,9 +84,10 @@ protected:
// Which non-zero channel did we last chat on?
static S32 sLastSpecialChatChannel;
- LLLineEditor* mChatBox;
- LLOutputMonitorCtrl* mOutputMonitor;
- LLLocalSpeakerMgr* mSpeakerMgr;
+ LLLineEditor* mChatBox;
+ LLView* mNearbyChat;
+ LLOutputMonitorCtrl* mOutputMonitor;
+ LLLocalSpeakerMgr* mSpeakerMgr;
S32 mExpandedHeight;
};
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index c43c95a366..7a17dbce3d 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -365,12 +365,15 @@ void LLNearbyChatScreenChannel::arrangeToasts()
if(mStopProcessing || isHovering())
return;
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
-
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
if (!getParent())
{
// connect to floater snap region just to get resize events, we don't care about being a proper widget
- floater_snap_region->addChild(this);
+ mFloaterSnapRegion->addChild(this);
setFollows(FOLLOWS_ALL);
}
@@ -378,7 +381,7 @@ void LLNearbyChatScreenChannel::arrangeToasts()
updateRect();
LLRect channel_rect;
- floater_snap_region->localRectToOtherView(floater_snap_region->getLocalRect(), &channel_rect, gFloaterView);
+ mFloaterSnapRegion->localRectToOtherView(mFloaterSnapRegion->getLocalRect(), &channel_rect, gFloaterView);
channel_rect.mLeft += 10;
channel_rect.mRight = channel_rect.mLeft + 300;
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index 45cf81751b..33dbd3bdc3 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -53,13 +53,22 @@ LLFastTimer::DeclareTimer FTM_GET_CHANNEL_RECT("Calculate Notification Channel R
LLRect LLScreenChannelBase::getChannelRect()
{
LLFastTimer _(FTM_GET_CHANNEL_RECT);
+
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
+ if (mChicletRegion == NULL)
+ {
+ mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ }
+
LLRect channel_rect;
LLRect chiclet_rect;
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
- floater_snap_region->localRectToScreen(floater_snap_region->getLocalRect(), &channel_rect);
- LLView* chiclet_region = gViewerWindow->getRootView()->getChildView("chiclet_container");
- chiclet_region->localRectToScreen(chiclet_region->getLocalRect(), &chiclet_rect);
+ mFloaterSnapRegion->localRectToScreen(mFloaterSnapRegion->getLocalRect(), &channel_rect);
+ mChicletRegion->localRectToScreen(mChicletRegion->getLocalRect(), &chiclet_rect);
channel_rect.mTop = chiclet_rect.mBottom;
return channel_rect;
@@ -81,14 +90,31 @@ LLScreenChannelBase::LLScreenChannelBase(const Params& p)
mShowToasts(true),
mID(p.id),
mDisplayToastsAlways(p.display_toasts_always),
- mChannelAlignment(p.channel_align)
-{
+ mChannelAlignment(p.channel_align),
+ mFloaterSnapRegion(NULL),
+ mChicletRegion(NULL)
+{
mID = p.id;
setMouseOpaque( false );
setVisible(FALSE);
}
+BOOL LLScreenChannelBase::postBuild()
+{
+ if (mFloaterSnapRegion == NULL)
+ {
+ mFloaterSnapRegion = gViewerWindow->getRootView()->getChildView("floater_snap_region");
+ }
+
+ if (mChicletRegion == NULL)
+ {
+ mChicletRegion = gViewerWindow->getRootView()->getChildView("chiclet_container");
+ }
+
+ return TRUE;
+}
+
void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent)
{
redrawToasts();
@@ -473,12 +499,10 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
//--------------------------------------------------------------------------
void LLScreenChannel::redrawToasts()
{
- LLView* floater_snap_region = gViewerWindow->getRootView()->getChildView("floater_snap_region");
-
if (!getParent())
{
// connect to floater snap region just to get resize events, we don't care about being a proper widget
- floater_snap_region->addChild(this);
+ mFloaterSnapRegion->addChild(this);
setFollows(FOLLOWS_ALL);
}
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 2f23552828..c9f8855fe6 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -69,6 +69,8 @@ public:
};
LLScreenChannelBase(const Params&);
+
+ BOOL postBuild();
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
@@ -123,7 +125,7 @@ protected:
// Channel's flags
bool mControlHovering;
- LLToast* mHoveredToast;
+ LLToast* mHoveredToast;
bool mCanStoreToasts;
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
@@ -137,6 +139,9 @@ protected:
// channel's ID
LLUUID mID;
+
+ LLView* mFloaterSnapRegion;
+ LLView* mChicletRegion;
};
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 8774482acd..24cb559fd0 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -117,6 +117,42 @@ BOOL LLSidepanelTaskInfo::postBuild()
childSetCommitCallback("checkbox next owner can transfer", &LLSidepanelTaskInfo::onCommitNextOwnerTransfer,this);
childSetCommitCallback("clickaction", &LLSidepanelTaskInfo::onCommitClickAction,this);
childSetCommitCallback("search_check", &LLSidepanelTaskInfo::onCommitIncludeInSearch,this);
+
+ mDAPermModify = getChild<LLUICtrl>("perm_modify");
+ mDACreator = getChildView("Creator:");
+ mDACreatorName = getChild<LLUICtrl>("Creator Name");
+ mDAOwner = getChildView("Owner:");
+ mDAOwnerName = getChild<LLUICtrl>("Owner Name");
+ mDAGroup = getChildView("Group:");
+ mDAGroupName = getChild<LLUICtrl>("Group Name");
+ mDAButtonSetGroup = getChildView("button set group");
+ mDAObjectName = getChild<LLUICtrl>("Object Name");
+ mDAName = getChildView("Name:");
+ mDADescription = getChildView("Description:");
+ mDAObjectDescription = getChild<LLUICtrl>("Object Description");
+ mDAPermissions = getChildView("Permissions:");
+ mDACheckboxShareWithGroup = getChild<LLUICtrl>("checkbox share with group");
+ mDAButtonDeed = getChildView("button deed");
+ mDACheckboxAllowEveryoneMove = getChild<LLUICtrl>("checkbox allow everyone move");
+ mDACheckboxAllowEveryoneCopy = getChild<LLUICtrl>("checkbox allow everyone copy");
+ mDANextOwnerCan = getChildView("Next owner can:");
+ mDACheckboxNextOwnerCanModify = getChild<LLUICtrl>("checkbox next owner can modify");
+ mDACheckboxNextOwnerCanCopy = getChild<LLUICtrl>("checkbox next owner can copy");
+ mDACheckboxNextOwnerCanTransfer = getChild<LLUICtrl>("checkbox next owner can transfer");
+ mDACheckboxForSale = getChild<LLUICtrl>("checkbox for sale");
+ mDASearchCheck = getChild<LLUICtrl>("search_check");
+ mDAComboSaleType = getChild<LLComboBox>("sale type");
+ mDACost = getChild<LLUICtrl>("Cost");
+ mDAEditCost = getChild<LLUICtrl>("Edit Cost");
+ mDALabelClickAction = getChildView("label click action");
+ mDAComboClickAction = getChild<LLComboBox>("clickaction");
+ mDAB = getChildView("B:");
+ mDAO = getChildView("O:");
+ mDAG = getChildView("G:");
+ mDAE = getChildView("E:");
+ mDAN = getChildView("N:");
+ mDAF = getChildView("F:");
+
return TRUE;
}
@@ -138,81 +174,80 @@ BOOL LLSidepanelTaskInfo::postBuild()
void LLSidepanelTaskInfo::disableAll()
{
- getChildView("perm_modify")->setEnabled(FALSE);
- getChild<LLUICtrl>("perm_modify")->setValue(LLStringUtil::null);
-
- getChildView("Creator:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Creator Name")->setValue(LLStringUtil::null);
- getChildView("Creator Name")->setEnabled(FALSE);
-
- getChildView("Owner:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Owner Name")->setValue(LLStringUtil::null);
- getChildView("Owner Name")->setEnabled(FALSE);
-
- getChildView("Group:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
- getChildView("Group Name")->setEnabled(FALSE);
- getChildView("button set group")->setEnabled(FALSE);
-
- getChild<LLUICtrl>("Object Name")->setValue(LLStringUtil::null);
- getChildView("Object Name")->setEnabled(FALSE);
- getChildView("Name:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Group Name")->setValue(LLStringUtil::null);
- getChildView("Group Name")->setEnabled(FALSE);
- getChildView("Description:")->setEnabled(FALSE);
- getChild<LLUICtrl>("Object Description")->setValue(LLStringUtil::null);
- getChildView("Object Description")->setEnabled(FALSE);
-
- getChildView("Permissions:")->setEnabled(FALSE);
+ mDAPermModify->setEnabled(FALSE);
+ mDAPermModify->setValue(LLStringUtil::null);
+
+ mDACreator->setEnabled(FALSE);
+ mDACreatorName->setValue(LLStringUtil::null);
+ mDACreatorName->setEnabled(FALSE);
+
+ mDAOwner->setEnabled(FALSE);
+ mDAOwnerName->setValue(LLStringUtil::null);
+ mDAOwnerName->setEnabled(FALSE);
+
+ mDAGroup->setEnabled(FALSE);
+ mDAGroupName->setValue(LLStringUtil::null);
+ mDAGroupName->setEnabled(FALSE);
+ mDAButtonSetGroup->setEnabled(FALSE);
+
+ mDAObjectName->setValue(LLStringUtil::null);
+ mDAObjectName->setEnabled(FALSE);
+ mDAName->setEnabled(FALSE);
+ mDAGroupName->setValue(LLStringUtil::null);
+ mDAGroupName->setEnabled(FALSE);
+ mDADescription->setEnabled(FALSE);
+ mDAObjectDescription->setValue(LLStringUtil::null);
+ mDAObjectDescription->setEnabled(FALSE);
+
+ mDAPermissions->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox share with group")->setValue(FALSE);
- getChildView("checkbox share with group")->setEnabled(FALSE);
- getChildView("button deed")->setEnabled(FALSE);
+ mDACheckboxShareWithGroup->setValue(FALSE);
+ mDACheckboxShareWithGroup->setEnabled(FALSE);
+ mDAButtonDeed->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone move")->setValue(FALSE);
- getChildView("checkbox allow everyone move")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox allow everyone copy")->setValue(FALSE);
- getChildView("checkbox allow everyone copy")->setEnabled(FALSE);
+ mDACheckboxAllowEveryoneMove->setValue(FALSE);
+ mDACheckboxAllowEveryoneMove->setEnabled(FALSE);
+ mDACheckboxAllowEveryoneCopy->setValue(FALSE);
+ mDACheckboxAllowEveryoneCopy->setEnabled(FALSE);
//Next owner can:
- getChildView("Next owner can:")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can modify")->setValue(FALSE);
- getChildView("checkbox next owner can modify")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can copy")->setValue(FALSE);
- getChildView("checkbox next owner can copy")->setEnabled(FALSE);
- getChild<LLUICtrl>("checkbox next owner can transfer")->setValue(FALSE);
- getChildView("checkbox next owner can transfer")->setEnabled(FALSE);
+ mDANextOwnerCan->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanModify->setValue(FALSE);
+ mDACheckboxNextOwnerCanModify->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanCopy->setValue(FALSE);
+ mDACheckboxNextOwnerCanCopy->setEnabled(FALSE);
+ mDACheckboxNextOwnerCanTransfer->setValue(FALSE);
+ mDACheckboxNextOwnerCanTransfer->setEnabled(FALSE);
//checkbox for sale
- getChild<LLUICtrl>("checkbox for sale")->setValue(FALSE);
- getChildView("checkbox for sale")->setEnabled(FALSE);
+ mDACheckboxForSale->setValue(FALSE);
+ mDACheckboxForSale->setEnabled(FALSE);
//checkbox include in search
- getChild<LLUICtrl>("search_check")->setValue(FALSE);
- getChildView("search_check")->setEnabled(FALSE);
+ mDASearchCheck->setValue(FALSE);
+ mDASearchCheck->setEnabled(FALSE);
- LLComboBox* combo_sale_type = getChild<LLComboBox>("sale type");
- combo_sale_type->setValue(LLSaleInfo::FS_COPY);
- combo_sale_type->setEnabled(FALSE);
+ mDAComboSaleType->setValue(LLSaleInfo::FS_COPY);
+ mDAComboSaleType->setEnabled(FALSE);
- getChildView("Cost")->setEnabled(FALSE);
- getChild<LLUICtrl>("Cost")->setValue(getString("Cost Default"));
- getChild<LLUICtrl>("Edit Cost")->setValue(LLStringUtil::null);
- getChildView("Edit Cost")->setEnabled(FALSE);
+ mDACost->setEnabled(FALSE);
+ mDACost->setValue(getString("Cost Default"));
+ mDAEditCost->setValue(LLStringUtil::null);
+ mDAEditCost->setEnabled(FALSE);
- getChildView("label click action")->setEnabled(FALSE);
- LLComboBox* combo_click_action = getChild<LLComboBox>("clickaction");
- if (combo_click_action)
+ mDALabelClickAction->setEnabled(FALSE);
+ if (mDAComboClickAction)
{
- combo_click_action->setEnabled(FALSE);
- combo_click_action->clear();
+ mDAComboClickAction->setEnabled(FALSE);
+ mDAComboClickAction->clear();
}
- getChildView("B:")->setVisible( FALSE);
- getChildView("O:")->setVisible( FALSE);
- getChildView("G:")->setVisible( FALSE);
- getChildView("E:")->setVisible( FALSE);
- getChildView("N:")->setVisible( FALSE);
- getChildView("F:")->setVisible( FALSE);
+
+ mDAB->setVisible(FALSE);
+ mDAO->setVisible(FALSE);
+ mDAG->setVisible(FALSE);
+ mDAE->setVisible(FALSE);
+ mDAN->setVisible(FALSE);
+ mDAF->setVisible(FALSE);
mOpenBtn->setEnabled(FALSE);
mPayBtn->setEnabled(FALSE);
diff --git a/indra/newview/llsidepaneltaskinfo.h b/indra/newview/llsidepaneltaskinfo.h
index 384bc479d6..be0fee2127 100644
--- a/indra/newview/llsidepaneltaskinfo.h
+++ b/indra/newview/llsidepaneltaskinfo.h
@@ -37,8 +37,9 @@
// Panel for permissions of an object.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLNameBox;
class LLCheckBoxCtrl;
+class LLComboBox;
+class LLNameBox;
class LLViewerObject;
class LLSidepanelTaskInfo : public LLSidepanelInventorySubpanel
@@ -118,6 +119,43 @@ private:
LLPointer<LLViewerObject> mObject;
LLObjectSelectionHandle mObjectSelection;
static LLSidepanelTaskInfo* sActivePanel;
+
+private:
+ // Pointers cached here to speed up the "disableAll" function which gets called on idle
+ LLUICtrl* mDAPermModify;
+ LLView* mDACreator;
+ LLUICtrl* mDACreatorName;
+ LLView* mDAOwner;
+ LLUICtrl* mDAOwnerName;
+ LLView* mDAGroup;
+ LLUICtrl* mDAGroupName;
+ LLView* mDAButtonSetGroup;
+ LLUICtrl* mDAObjectName;
+ LLView* mDAName;
+ LLView* mDADescription;
+ LLUICtrl* mDAObjectDescription;
+ LLView* mDAPermissions;
+ LLUICtrl* mDACheckboxShareWithGroup;
+ LLView* mDAButtonDeed;
+ LLUICtrl* mDACheckboxAllowEveryoneMove;
+ LLUICtrl* mDACheckboxAllowEveryoneCopy;
+ LLView* mDANextOwnerCan;
+ LLUICtrl* mDACheckboxNextOwnerCanModify;
+ LLUICtrl* mDACheckboxNextOwnerCanCopy;
+ LLUICtrl* mDACheckboxNextOwnerCanTransfer;
+ LLUICtrl* mDACheckboxForSale;
+ LLUICtrl* mDASearchCheck;
+ LLComboBox* mDAComboSaleType;
+ LLUICtrl* mDACost;
+ LLUICtrl* mDAEditCost;
+ LLView* mDALabelClickAction;
+ LLComboBox* mDAComboClickAction;
+ LLView* mDAB;
+ LLView* mDAO;
+ LLView* mDAG;
+ LLView* mDAE;
+ LLView* mDAN;
+ LLView* mDAF;
};
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 75db269bde..89240c982f 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -114,6 +114,7 @@ LLStatusBar::LLStatusBar(const LLRect& rect)
mTextTime(NULL),
mSGBandwidth(NULL),
mSGPacketLoss(NULL),
+ mBtnStats(NULL),
mBtnVolume(NULL),
mBoxBalance(NULL),
mBalance(0),
@@ -173,6 +174,8 @@ BOOL LLStatusBar::postBuild()
mBoxBalance = getChild<LLTextBox>("balance");
mBoxBalance->setClickedCallback( &LLStatusBar::onClickBalance, this );
+
+ mBtnStats = getChildView("stat_btn");
mBtnVolume = getChild<LLButton>( "volume_btn" );
mBtnVolume->setClickedCallback( onClickVolume, this );
@@ -288,7 +291,7 @@ void LLStatusBar::refresh()
mSGBandwidth->setVisible(net_stats_visible);
mSGPacketLoss->setVisible(net_stats_visible);
- getChildView("stat_btn")->setEnabled(net_stats_visible);
+ mBtnStats->setEnabled(net_stats_visible);
// update the master volume button state
bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute();
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index 4ea3183d18..9d28e6c2bc 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -102,10 +102,11 @@ private:
LLStatGraph *mSGBandwidth;
LLStatGraph *mSGPacketLoss;
+ LLView *mBtnStats;
LLButton *mBtnVolume;
LLTextBox *mBoxBalance;
LLButton *mMediaToggle;
- LLView* mScriptOut;
+ LLView *mScriptOut;
LLFrameTimer mClockUpdateTimer;
S32 mBalance;