From 69cd9ac98bde4d602a8bdb785ac576df958ea1f5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 4 Dec 2009 18:31:57 +0200 Subject: Completed normal task EXT-3081 (Separate Message Well on Notifications Well and IM Well) -- created IM Wel icon -- functionality is moved from the base class into appropriate classes (for Notification & IM Well windows) --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'indra/newview/llchiclet.cpp') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 588855d088..5fad030e5b 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -55,6 +55,7 @@ #include "lltransientfloatermgr.h" static LLDefaultChildRegistry::Register t1("chiclet_panel"); +static LLDefaultChildRegistry::Register t2_0("chiclet_im_well"); static LLDefaultChildRegistry::Register t2("chiclet_notification"); static LLDefaultChildRegistry::Register t3("chiclet_im_p2p"); static LLDefaultChildRegistry::Register t4("chiclet_im_group"); @@ -69,7 +70,6 @@ static const S32 OVERLAY_ICON_SHIFT = 2; // used for shifting of an overlay icon // static const S32 LLChicletPanel::s_scroll_ratio = 10; -S32 LLNotificationChiclet::mUreadSystemNotifications = 0; boost::signals2::signal > > @@ -78,7 +78,7 @@ boost::signals2::signal(button_params); addChild(mButton); - - // connect counter handlers to the signals - connectCounterUpdatersToSignal("notify"); - connectCounterUpdatersToSignal("groupnotify"); - connectCounterUpdatersToSignal("offer"); } -LLNotificationChiclet::~LLNotificationChiclet() +LLSysWellChiclet::~LLSysWellChiclet() { } -void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notification_type) +void LLSysWellChiclet::connectCounterUpdatersToSignal(std::string notification_type) { LLNotificationsUI::LLNotificationManager* manager = LLNotificationsUI::LLNotificationManager::getInstance(); LLNotificationsUI::LLEventHandler* n_handler = manager->getHandlerForNotification(notification_type); @@ -119,7 +115,7 @@ void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notificat } } -void LLNotificationChiclet::setCounter(S32 counter) +void LLSysWellChiclet::setCounter(S32 counter) { std::string s_count; if(counter != 0) @@ -132,16 +128,26 @@ void LLNotificationChiclet::setCounter(S32 counter) mCounter = counter; } -boost::signals2::connection LLNotificationChiclet::setClickCallback( +boost::signals2::connection LLSysWellChiclet::setClickCallback( const commit_callback_t& cb) { return mButton->setClickedCallback(cb); } -void LLNotificationChiclet::setToggleState(BOOL toggled) { +void LLSysWellChiclet::setToggleState(BOOL toggled) { mButton->setToggleState(toggled); } +LLNotificationChiclet::LLNotificationChiclet(const Params& p) +: LLSysWellChiclet(p) +{ + // connect counter handlers to the signals + connectCounterUpdatersToSignal("notify"); + connectCounterUpdatersToSignal("groupnotify"); + connectCounterUpdatersToSignal("offer"); +} + + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3