diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lloverlaybar.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp index 5dd5d39..91a7375 100644 --- a/linden/indra/newview/lloverlaybar.cpp +++ b/linden/indra/newview/lloverlaybar.cpp | |||
@@ -102,7 +102,8 @@ LLOverlayBar::LLOverlayBar() | |||
102 | : LLPanel(), | 102 | : LLPanel(), |
103 | mMediaRemote(NULL), | 103 | mMediaRemote(NULL), |
104 | mVoiceRemote(NULL), | 104 | mVoiceRemote(NULL), |
105 | mMusicState(STOPPED) | 105 | mMusicState(STOPPED), |
106 | mOriginalIMLabel("") | ||
106 | { | 107 | { |
107 | setMouseOpaque(FALSE); | 108 | setMouseOpaque(FALSE); |
108 | setIsChrome(TRUE); | 109 | setIsChrome(TRUE); |
@@ -129,6 +130,8 @@ BOOL LLOverlayBar::postBuild() | |||
129 | setFocusRoot(TRUE); | 130 | setFocusRoot(TRUE); |
130 | mBuilt = true; | 131 | mBuilt = true; |
131 | 132 | ||
133 | mOriginalIMLabel = getChild<LLButton>("IM Received")->getLabelSelected(); | ||
134 | |||
132 | layoutButtons(); | 135 | layoutButtons(); |
133 | return TRUE; | 136 | return TRUE; |
134 | } | 137 | } |
@@ -192,9 +195,25 @@ void LLOverlayBar::refresh() | |||
192 | BOOL buttons_changed = FALSE; | 195 | BOOL buttons_changed = FALSE; |
193 | 196 | ||
194 | BOOL im_received = gIMMgr->getIMReceived(); | 197 | BOOL im_received = gIMMgr->getIMReceived(); |
198 | int unread_count = gIMMgr->getIMUnreadCount(); | ||
195 | LLButton* button = getChild<LLButton>("IM Received"); | 199 | LLButton* button = getChild<LLButton>("IM Received"); |
196 | if (button && button->getVisible() != im_received) | 200 | |
201 | if (button && button->getVisible() != im_received || | ||
202 | button && button->getVisible()) | ||
197 | { | 203 | { |
204 | if (unread_count > 0) | ||
205 | { | ||
206 | if (unread_count > 1) | ||
207 | { | ||
208 | std::stringstream ss; | ||
209 | ss << unread_count << " " << getString("unread_count_string_plural"); | ||
210 | button->setLabel(ss.str()); | ||
211 | } | ||
212 | else | ||
213 | { | ||
214 | button->setLabel("1 " + mOriginalIMLabel); | ||
215 | } | ||
216 | } | ||
198 | button->setVisible(im_received); | 217 | button->setVisible(im_received); |
199 | sendChildToFront(button); | 218 | sendChildToFront(button); |
200 | moveChildToBackOfTabGroup(button); | 219 | moveChildToBackOfTabGroup(button); |