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