Unread IMs counter in window title
parent
d2f831bfc0
commit
214414fe28
|
|
@ -40,6 +40,9 @@
|
|||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
#include "llchannelmanager.h"
|
||||
// [/SL:KB]
|
||||
// <FS:PP> Unread IMs counter in window title
|
||||
#include "llviewerwindow.h"
|
||||
// </FS:PP>
|
||||
|
||||
// Firestorm includes
|
||||
#include "fsfloaterim.h"
|
||||
|
|
@ -53,6 +56,10 @@
|
|||
#include "lltransientfloatermgr.h"
|
||||
#include "llvoiceclient.h"
|
||||
|
||||
// <FS:PP> Unread IMs counter in window title
|
||||
extern std::string gWindowTitle;
|
||||
// </FS:PP>
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
|
||||
static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification");
|
||||
static LLDefaultChildRegistry::Register<LLScriptChiclet> t6("chiclet_script");
|
||||
|
|
@ -274,6 +281,24 @@ void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)
|
|||
mFlashToLitTimer->stopFlashing();
|
||||
}
|
||||
|
||||
// <FS:PP> Unread IMs counter in window title
|
||||
std::string window_title;
|
||||
if (counter > 99)
|
||||
{
|
||||
window_title = "(99+) " + gWindowTitle;
|
||||
}
|
||||
else if (counter > 0)
|
||||
{
|
||||
window_title = "(" + llformat("%d", counter) + ") " + gWindowTitle;
|
||||
}
|
||||
else
|
||||
{
|
||||
window_title = gWindowTitle;
|
||||
}
|
||||
LLStringUtil::truncate(window_title, 255);
|
||||
gViewerWindow->getWindow()->setTitle(window_title);
|
||||
// </FS:PP>
|
||||
|
||||
setCounter(counter);
|
||||
}
|
||||
// </FS:Ansariel> [FS communication UI]
|
||||
|
|
|
|||
Loading…
Reference in New Issue