summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
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/llui/llmenugl.cpp
parente0a364b7bf836191f25604ef9c3783be46c1ce55 (diff)
convert signals to allocate on demand in order to speed up widget construction
reviewed by James
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index de9a854f63..f8935d03ac 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -760,21 +760,25 @@ void LLMenuItemCallGL::initFromParams(const Params& p)
{
if (p.on_visible.isProvided())
{
- initVisibleCallback(p.on_visible, mVisibleSignal);
+ mVisibleSignal.connect(initVisibleCallback(p.on_visible));
}
if (p.on_enable.isProvided())
{
- initEnableCallback(p.on_enable, mEnableSignal);
+ setEnableCallback(initEnableCallback(p.on_enable));
// Set the enabled control variable (for backwards compatability)
if (p.on_enable.control_name.isProvided() && !p.on_enable.control_name().empty())
{
LLControlVariable* control = findControl(p.on_enable.control_name());
if (control)
+ {
setEnabledControlVariable(control);
+ }
}
}
if (p.on_click.isProvided())
- initCommitCallback(p.on_click, mCommitSignal);
+ {
+ setCommitCallback(initCommitCallback(p.on_click));
+ }
LLUICtrl::initFromParams(p);
}
@@ -795,7 +799,10 @@ void LLMenuItemCallGL::updateEnabled( void )
if (mEnabledControlVariable)
{
if (!enabled)
- mEnabledControlVariable->set(false); // callback overrides control variable; this will call setEnabled()
+ {
+ // callback overrides control variable; this will call setEnabled()
+ mEnabledControlVariable->set(false);
+ }
}
else
{
@@ -854,7 +861,7 @@ void LLMenuItemCheckGL::initFromParams(const Params& p)
{
if (p.on_check.isProvided())
{
- initEnableCallback(p.on_check, mCheckSignal);
+ setCheckCallback(initEnableCallback(p.on_check));
// Set the control name (for backwards compatability)
if (p.on_check.control_name.isProvided() && !p.on_check.control_name().empty())
{