summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r--indra/newview/llchiclet.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 4078fac4ec..9845664c74 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -81,27 +81,17 @@ LLNotificationChiclet::Params::Params()
button.tab_stop(FALSE);
button.label(LLStringUtil::null);
- unread_notifications.name("unread");
- unread_notifications.font(LLFontGL::getFontSansSerif());
- unread_notifications.text_color=(LLColor4::white);
- unread_notifications.font_halign(LLFontGL::HCENTER);
- unread_notifications.mouse_opaque(FALSE);
}
LLNotificationChiclet::LLNotificationChiclet(const Params& p)
: LLChiclet(p)
, mButton(NULL)
-, mCounterCtrl(NULL)
+, mCounter(0)
{
LLButton::Params button_params = p.button;
- button_params.rect(p.rect());
mButton = LLUICtrlFactory::create<LLButton>(button_params);
addChild(mButton);
- LLChicletNotificationCounterCtrl::Params unread_params = p.unread_notifications;
- mCounterCtrl = LLUICtrlFactory::create<LLChicletNotificationCounterCtrl>(unread_params);
- addChild(mCounterCtrl);
-
// connect counter handlers to the signals
connectCounterUpdatersToSignal("notify");
connectCounterUpdatersToSignal("groupnotify");
@@ -126,13 +116,15 @@ void LLNotificationChiclet::connectCounterUpdatersToSignal(std::string notificat
void LLNotificationChiclet::setCounter(S32 counter)
{
- mCounterCtrl->setCounter(counter);
-}
+ std::string s_count;
+ if(counter != 0)
+ {
+ s_count = llformat("%d", counter);
+ }
-void LLNotificationChiclet::setShowCounter(bool show)
-{
- LLChiclet::setShowCounter(show);
- mCounterCtrl->setVisible(getShowCounter());
+ mButton->setLabel(s_count);
+
+ mCounter = counter;
}
boost::signals2::connection LLNotificationChiclet::setClickCallback(
@@ -482,6 +474,10 @@ void LLIMP2PChiclet::onMenuItemClicked(const LLSD& user_data)
{
LLAvatarActions::requestFriendshipDialog(other_participant_id);
}
+ else if("end" == level)
+ {
+ LLAvatarActions::endIM(other_participant_id);
+ }
}
//////////////////////////////////////////////////////////////////////////
@@ -776,12 +772,16 @@ void LLIMGroupChiclet::onMenuItemClicked(const LLSD& user_data)
if("group chat" == level)
{
- LLGroupActions::startChat(group_id);
+ LLGroupActions::startIM(group_id);
}
else if("info" == level)
{
LLGroupActions::show(group_id);
}
+ else if("end" == level)
+ {
+ LLGroupActions::endIM(group_id);
+ }
}