summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastnotifypanel.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-11-12 14:06:38 -0500
committerMonty Brandenberg <monty@lindenlab.com>2013-11-12 14:06:38 -0500
commitd191585a3eec778e36e5f0c4b620c3d525c86c42 (patch)
tree2612c0d1947e00d9ceba82b054a7a90113ffa752 /indra/newview/lltoastnotifypanel.cpp
parentac1d3a22f2034a5e3aba757bde72825643fa799c (diff)
parentebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff)
Merge. Refresh from viewer-release after 3.6.10 release
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rwxr-xr-xindra/newview/lltoastnotifypanel.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 94d07b37ef..3a41bf28b4 100755
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -407,6 +407,28 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
}
}
+bool LLToastNotifyPanel::isControlPanelEnabled() const
+{
+ bool cp_enabled = mControlPanel->getEnabled();
+ bool some_buttons_enabled = false;
+ if (cp_enabled)
+ {
+ LLView::child_list_const_iter_t child_it = mControlPanel->beginChild();
+ LLView::child_list_const_iter_t child_it_end = mControlPanel->endChild();
+ for(; child_it != child_it_end; ++child_it)
+ {
+ LLButton * buttonp = dynamic_cast<LLButton *>(*child_it);
+ if (buttonp && buttonp->getEnabled())
+ {
+ some_buttons_enabled = true;
+ break;
+ }
+ }
+ }
+
+ return cp_enabled && some_buttons_enabled;
+}
+
//////////////////////////////////////////////////////////////////////////
LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */,