summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastnotifypanel.cpp
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2013-08-23 20:31:02 +0300
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2013-08-23 20:31:02 +0300
commit19f20baffba3fcbc1558e882fee64a4ac6c28d4b (patch)
treefd556ed5b2694480fc712b00f697089a35b9dc45 /indra/newview/lltoastnotifypanel.cpp
parent8735f383c8393d3cf102681e8243a2ac64220649 (diff)
MAINT-2575 FIXED Resident can accept unlimited number of friendship requests if they were sent before his first accept
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 */,