summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorrichard <none@none>2009-11-23 11:42:32 -0800
committerrichard <none@none>2009-11-23 11:42:32 -0800
commit7fd1488c6218ddbd82de0eea86297e65f2561bc7 (patch)
treea7a29812c0ed94c6a07c396f5e516dcf0950c99f /indra/newview
parente0a364b7bf836191f25604ef9c3783be46c1ce55 (diff)
convert signals to allocate on demand in order to speed up widget construction
reviewed by James
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchiclet.cpp9
-rw-r--r--indra/newview/llfavoritesbar.cpp6
-rw-r--r--indra/newview/llfloaterbuyland.cpp2
-rw-r--r--indra/newview/llfloaterchat.cpp2
-rw-r--r--indra/newview/llfloaterchatterbox.cpp2
-rw-r--r--indra/newview/llfloaterland.cpp2
-rw-r--r--indra/newview/llimpanel.cpp2
-rw-r--r--indra/newview/llmediactrl.cpp2
-rw-r--r--indra/newview/llpanelavatartag.cpp2
-rw-r--r--indra/newview/llpanelpeople.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp2
11 files changed, 19 insertions, 14 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 9845664c74..5fd4dcd343 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -163,7 +163,7 @@ LLChiclet::~LLChiclet()
boost::signals2::connection LLChiclet::setLeftButtonClickCallback(
const commit_callback_t& cb)
{
- return mCommitSignal.connect(cb);
+ return setCommitCallback(cb);
}
BOOL LLChiclet::handleMouseDown(S32 x, S32 y, MASK mask)
@@ -972,7 +972,10 @@ void LLChicletPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param)
void LLChicletPanel::onChicletClick(LLUICtrl*ctrl,const LLSD&param)
{
- mCommitSignal(ctrl,param);
+ if (mCommitSignal)
+ {
+ (*mCommitSignal)(ctrl,param);
+ }
}
void LLChicletPanel::removeChiclet(chiclet_list_t::iterator it)
@@ -1277,7 +1280,7 @@ void LLChicletPanel::onRightScrollHeldDown()
boost::signals2::connection LLChicletPanel::setChicletClickedCallback(
const commit_callback_t& cb)
{
- return mCommitSignal.connect(cb);
+ return setCommitCallback(cb);
}
BOOL LLChicletPanel::handleScrollWheel(S32 x, S32 y, S32 clicks)
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index ae5be8cc7c..8406ddeeca 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -232,13 +232,15 @@ public:
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask)
{
- mMouseDownSignal(this, x, y, mask);
+ if (mMouseDownSignal)
+ (*mMouseDownSignal)(this, x, y, mask);
return LLMenuItemCallGL::handleMouseDown(x, y, mask);
}
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask)
{
- mMouseUpSignal(this, x, y, mask);
+ if (mMouseUpSignal)
+ (*mMouseUpSignal)(this, x, y, mask);
return LLMenuItemCallGL::handleMouseUp(x, y, mask);
}
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 467796b4a3..976aaf8044 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -903,7 +903,7 @@ void LLFloaterBuyLandUI::tellUserError(
// virtual
BOOL LLFloaterBuyLandUI::postBuild()
{
- mVisibleSignal.connect(boost::bind(&LLFloaterBuyLandUI::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLFloaterBuyLandUI::onVisibilityChange, this, _2));
mCurrency.prepare();
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 58025ef78b..57bb93d81a 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -129,7 +129,7 @@ void LLFloaterChat::draw()
BOOL LLFloaterChat::postBuild()
{
// Hide the chat overlay when our history is visible.
- mVisibleSignal.connect(boost::bind(&LLFloaterChat::updateConsoleVisibility, this));
+ setVisibleCallback(boost::bind(&LLFloaterChat::updateConsoleVisibility, this));
mPanel = (LLPanelActiveSpeakers*)getChild<LLPanel>("active_speakers_panel");
diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp
index fbf09207fe..1b14ca573a 100644
--- a/indra/newview/llfloaterchatterbox.cpp
+++ b/indra/newview/llfloaterchatterbox.cpp
@@ -114,7 +114,7 @@ LLFloaterChatterBox::~LLFloaterChatterBox()
BOOL LLFloaterChatterBox::postBuild()
{
- mVisibleSignal.connect(boost::bind(&LLFloaterChatterBox::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLFloaterChatterBox::onVisibilityChange, this, _2));
if (gSavedSettings.getBOOL("ContactsTornOff"))
{
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 22d6098d5b..d855ab1dfa 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -239,7 +239,7 @@ LLFloaterLand::LLFloaterLand(const LLSD& seed)
BOOL LLFloaterLand::postBuild()
{
- mVisibleSignal.connect(boost::bind(&LLFloaterLand::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLFloaterLand::onVisibilityChange, this, _2));
LLTabContainer* tab = getChild<LLTabContainer>("landtab");
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 87b801d73b..e6ded5f371 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -216,7 +216,7 @@ LLFloaterIMPanel::~LLFloaterIMPanel()
BOOL LLFloaterIMPanel::postBuild()
{
- mVisibleSignal.connect(boost::bind(&LLFloaterIMPanel::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLFloaterIMPanel::onVisibilityChange, this, _2));
mInputEditor = getChild<LLLineEditor>("chat_editor");
mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) );
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 5cd40273f6..2376a3581d 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -356,7 +356,7 @@ void LLMediaCtrl::onFocusLost()
//
BOOL LLMediaCtrl::postBuild ()
{
- mVisibleSignal.connect(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChange, this, _2));
return TRUE;
}
diff --git a/indra/newview/llpanelavatartag.cpp b/indra/newview/llpanelavatartag.cpp
index 03ad19f911..7563cc7f61 100644
--- a/indra/newview/llpanelavatartag.cpp
+++ b/indra/newview/llpanelavatartag.cpp
@@ -92,7 +92,7 @@ void LLPanelAvatarTag::setAvatarId(const LLUUID& avatar_id)
boost::signals2::connection LLPanelAvatarTag::setLeftButtonClickCallback(
const commit_callback_t& cb)
{
- return mCommitSignal.connect(cb);
+ return setCommitCallback(cb);
}
BOOL LLPanelAvatarTag::handleMouseDown(S32 x, S32 y, MASK mask)
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 4dc8872557..03421ce4f0 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -483,7 +483,7 @@ void LLPanelPeople::onFriendsAccordionExpandedCollapsed(const LLSD& param, LLAva
BOOL LLPanelPeople::postBuild()
{
- mVisibleSignal.connect(boost::bind(&LLPanelPeople::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLPanelPeople::onVisibilityChange, this, _2));
mFilterEditor = getChild<LLFilterEditor>("filter_input");
mFilterEditor->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2));
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 49a2a3723d..3d2c529dda 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -355,7 +355,7 @@ LLPreviewGesture::~LLPreviewGesture()
BOOL LLPreviewGesture::postBuild()
{
- mVisibleSignal.connect(boost::bind(&LLPreviewGesture::onVisibilityChange, this, _2));
+ setVisibleCallback(boost::bind(&LLPreviewGesture::onVisibilityChange, this, _2));
LLLineEditor* edit;
LLComboBox* combo;