diff options
author | Oz Linden <oz@lindenlab.com> | 2013-12-12 15:51:43 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-12-12 15:51:43 -0500 |
commit | dec487cd7f04f00d4aa6428d190ffbf978ea57da (patch) | |
tree | d96cda0e2f03c1cf5b1f7ffcdd564690e0ab2cad /indra/newview/lltoastnotifypanel.cpp | |
parent | c9775dde6249582f0e8976be15e72bfebc4ac3fc (diff) | |
parent | 1a9b9f1bd1b5f64b35b9ce6eff458cdb7a79fe6e (diff) |
merge changes for 3.6.12-release
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rwxr-xr-x | indra/newview/lltoastnotifypanel.cpp | 22 |
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 */, |