diff options
author | Baker Linden <baker@lindenlab.com> | 2013-12-18 18:25:47 -0500 |
---|---|---|
committer | Baker Linden <baker@lindenlab.com> | 2013-12-18 18:25:47 -0500 |
commit | 3c521d8207092f1c48e158082b88c5e81cc9c440 (patch) | |
tree | 36a18cfaed8fc4e3ee2a84604f3876832522e529 /indra/newview/lltoastnotifypanel.cpp | |
parent | 74707f0057c05dc4dd439302e64fe29e8ed91a32 (diff) | |
parent | 1a9b9f1bd1b5f64b35b9ce6eff458cdb7a79fe6e (diff) |
viewer-release merge
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rwxr-xr-x | indra/newview/lltoastnotifypanel.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 8bfde2bcf1..3a41bf28b4 100755 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -60,7 +60,7 @@ LLToastNotifyPanel::LLToastNotifyPanel(const LLNotificationPtr& notification, co LLInstanceTracker<LLToastNotifyPanel, LLUUID>(notification->getID()) { init(rect, show_images); - } +} void LLToastNotifyPanel::addDefaultButton() { LLSD form_element; @@ -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 */, |