aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lloverlaybar.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-08 23:23:07 -0700
committerMcCabe Maxsted2009-06-08 23:23:07 -0700
commitc4f22cd6a6f96546a39702097accc8557130d34a (patch)
tree8827b07170fea501cdfbfd7696461298dfb587dc /linden/indra/newview/lloverlaybar.cpp
parentMerged in 1.2.0-communicatetitle (diff)
downloadmeta-impy-c4f22cd6a6f96546a39702097accc8557130d34a.zip
meta-impy-c4f22cd6a6f96546a39702097accc8557130d34a.tar.gz
meta-impy-c4f22cd6a6f96546a39702097accc8557130d34a.tar.bz2
meta-impy-c4f22cd6a6f96546a39702097accc8557130d34a.tar.xz
'IM Received' button to '__ New IMs'
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lloverlaybar.cpp23
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);