diff options
author | Richard Linden <none@none> | 2012-03-29 23:48:29 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-03-29 23:48:29 -0700 |
commit | 2fa1c42aadbe2a29e1bcced9a487c0e5abf0602b (patch) | |
tree | 08d9ebd23121654a9cf4e0561b1256de9bc9b608 /indra/newview/llchiclet.cpp | |
parent | 1ea65f0285d7022ce20ef84d4e35e3c94bcb3fbd (diff) |
CHUI-51 WIP notifications routig code cleanup
phase 2, removal of extraneous signaling in favor of llnotificationchannels
made notificationchannels work better with overrides and lifetime managed
by creator
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r-- | indra/newview/llchiclet.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 9f19f8dd1c..67519a3ca6 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -335,29 +335,15 @@ void LLIMWellChiclet::messageCountChanged(const LLSD& session_data) /* LLNotificationChiclet implementation */ /************************************************************************/ LLNotificationChiclet::LLNotificationChiclet(const Params& p) -: LLSysWellChiclet(p) -, mUreadSystemNotifications(0) +: LLSysWellChiclet(p), + mUreadSystemNotifications(0) { - // connect counter handlers to the signals - connectCounterUpdatersToSignal("Notify"); - connectCounterUpdatersToSignal("Group Notify"); - connectCounterUpdatersToSignal("Offer"); - + mNotificationChannel.reset(new ChicletNotificationChannel(this)); // ensure that notification well window exists, to synchronously // handle toast add/delete events. LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); } -void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type) -{ - LLNotificationsUI::LLEventHandler* n_handler = dynamic_cast<LLNotificationsUI::LLEventHandler*>(LLNotifications::instance().getChannel(notification_type).get()); - if(n_handler) - { - n_handler->setNewNotificationCallback(boost::bind(&LLNotificationChiclet::incUreadSystemNotifications, this)); - n_handler->setDelNotification(boost::bind(&LLNotificationChiclet::decUreadSystemNotifications, this)); - } -} - void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) { std::string action = user_data.asString(); @@ -406,6 +392,12 @@ void LLNotificationChiclet::setCounter(S32 counter) updateWidget(getCounter() == 0); } + +bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNotificationPtr notify ) +{ + return !(notify->canLogToIM() && notify->hasFormElements()); +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// |