Improvements to NewIMsPerConversation mechaics and includes cleanup in lloverlaybar.cpp
This commit is contained in:
@@ -39,21 +39,13 @@
|
||||
|
||||
#include "aoremotectrl.h"
|
||||
#include "llaudioengine.h"
|
||||
#include "importtracker.h"
|
||||
#include "llrender.h"
|
||||
#include "llagent.h"
|
||||
#include "llagentcamera.h"
|
||||
#include "llbutton.h"
|
||||
#include "llchatbar.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "llimpanel.h"
|
||||
#include "llimview.h"
|
||||
#include "llfloaterchatterbox.h"
|
||||
#include "llmediaremotectrl.h"
|
||||
#include "llpanelaudiovolume.h"
|
||||
#include "llparcel.h"
|
||||
#include "lltextbox.h"
|
||||
#include "llui.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewertexturelist.h"
|
||||
#include "llviewerjoystick.h"
|
||||
#include "llviewermedia.h"
|
||||
@@ -62,20 +54,13 @@
|
||||
#include "llviewerparcelmedia.h"
|
||||
#include "llviewerparcelmgr.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoiceclient.h"
|
||||
#include "llvoavatarself.h"
|
||||
#include "llvoiceremotectrl.h"
|
||||
#include "llmediactrl.h"
|
||||
#include "llselectmgr.h"
|
||||
#include "wlfPanel_AdvSettings.h"
|
||||
#include "llpanelnearbymedia.h"
|
||||
|
||||
|
||||
|
||||
#include "llcontrol.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
@@ -309,21 +294,18 @@ void LLOverlayBar::refresh()
|
||||
{
|
||||
bool buttons_changed = FALSE;
|
||||
|
||||
if (LLButton* button = updateButtonVisiblity(mNewIM,gIMMgr->getIMReceived()))
|
||||
int count(0);
|
||||
static const LLCachedControl<bool> per_conversation("NewIMsPerConversation");
|
||||
if (per_conversation && !LLFloaterChatterBox::instanceVisible())
|
||||
{
|
||||
int unread_count(0);
|
||||
static const LLCachedControl<bool> per_conversation("NewIMsPerConversation");
|
||||
if (per_conversation)
|
||||
{
|
||||
for(std::set<LLHandle<LLFloater> >::const_iterator it = gIMMgr->getIMFloaterHandles().begin(); it != gIMMgr->getIMFloaterHandles().end(); ++it)
|
||||
if (LLFloaterIMPanel* im_floater = static_cast<LLFloaterIMPanel*>(it->get()))
|
||||
if (im_floater->getParent() != gFloaterView && im_floater->getNumUnreadMessages()) // Only count docked IMs
|
||||
++unread_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
unread_count = gIMMgr->getIMUnreadCount();
|
||||
}
|
||||
for(std::set<LLHandle<LLFloater> >::const_iterator it = gIMMgr->getIMFloaterHandles().begin(); it != gIMMgr->getIMFloaterHandles().end(); ++it)
|
||||
if (LLFloaterIMPanel* im_floater = static_cast<LLFloaterIMPanel*>(it->get()))
|
||||
if (im_floater->getParent() != gFloaterView && im_floater->getNumUnreadMessages()) // Only count docked IMs
|
||||
++count;
|
||||
}
|
||||
if (LLButton* button = updateButtonVisiblity(mNewIM, per_conversation ? count : gIMMgr->getIMReceived()))
|
||||
{
|
||||
int unread_count(per_conversation ? count : gIMMgr->getIMUnreadCount());
|
||||
|
||||
if (unread_count > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user