summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastnotifypanel.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-12-12 09:03:21 -0800
committerMerov Linden <merov@lindenlab.com>2013-12-12 09:03:21 -0800
commita4f121f065c580ac34e8caa666855c95eb29138b (patch)
tree2e9d9766c99cb7bd81aa4ad7e4af1149cfa03de6 /indra/newview/lltoastnotifypanel.cpp
parent88f139594bb819bc31b438edcceaf9cd661b3f82 (diff)
parent1a9b9f1bd1b5f64b35b9ce6eff458cdb7a79fe6e (diff)
Pull merge from lindenlab/viewer-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 */,