summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychathandler.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-07-30 23:22:41 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-07-30 23:22:41 +0000
commite97f7728a90dd66014f6b3f0cd5e8d4c71f48691 (patch)
tree4be178df6b50a3395105cdd3ac0044d6467a9fa3 /indra/newview/llnearbychathandler.cpp
parentd5aa10143a0e6457b3326ba839c81b7c956a015e (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1170 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1187 -> viewer-2.0.0-3
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r--indra/newview/llnearbychathandler.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index ab66421d35..cb1b65a604 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -61,6 +61,7 @@ LLNearbyChatHandler::LLNearbyChatHandler(e_notification_type type, const LLSD& i
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createChannel(p);
mChannel->setFollows(FOLLOWS_LEFT | FOLLOWS_BOTTOM | FOLLOWS_TOP);
+ mChannel->setOverflowFormatString("You have %d unread nearby chat messages");
mChannel->setStoreToasts(false);
}
LLNearbyChatHandler::~LLNearbyChatHandler()
@@ -71,6 +72,9 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
if(chat_msg.mSourceType == CHAT_SOURCE_AGENT && chat_msg.mFromID.notNull())
LLRecentPeople::instance().add(chat_msg.mFromID);
+ if(chat_msg.mText.empty())
+ return;//don't process empty messages
+
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
nearby_chat->addMessage(chat_msg);
if(nearby_chat->getVisible())
@@ -82,7 +86,9 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
LLChatItemCtrl* item = LLChatItemCtrl::createInstance();
item->setMessage(chat_msg);
- item->setWidth(nearby_chat->getRect().getWidth() - 16);
+ //static S32 chat_item_width = nearby_chat->getRect().getWidth() - 16;
+ static S32 chat_item_width = 304;
+ item->setWidth(chat_item_width);
item->setHeaderVisibility((EShowItemHeader)gSavedSettings.getS32("nearbychat_showicons_and_names"));
item->setVisible(true);
@@ -91,7 +97,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)
LLToast* toast = mChannel->addToast(id, item);
toast->setOnMouseEnterCallback(boost::bind(&LLNearbyChatHandler::onToastDestroy, this, toast));
- toast->setAndStartTimer(10); //TODO: set correct time
+ toast->setAndStartTimer(gSavedSettings.getS32("NotificationToastTime"));
}
void LLNearbyChatHandler::onToastDestroy(LLToast* toast)