summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychatbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r--indra/newview/llnearbychatbar.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 32dc5e5927..bcb4edd7c1 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -36,6 +36,7 @@
#include "lltrans.h"
#include "llnearbychatbar.h"
+#include "llspeakbutton.h"
#include "llbottomtray.h"
#include "llagent.h"
#include "llgesturemgr.h"
@@ -77,6 +78,10 @@ LLGestureComboBox::LLGestureComboBox(const LLGestureComboBox::Params& p)
// refresh list from current active gestures
refreshGestures();
+
+ // This forces using of halign from xml, since LLComboBox
+ // sets it to LLFontGL::LEFT, if text entry is disabled
+ mButton->setHAlign(p.drop_down_button.font_halign);
}
LLGestureComboBox::~LLGestureComboBox()
@@ -207,6 +212,7 @@ LLNearbyChatBar::LLNearbyChatBar()
: LLPanel()
, mChatBox(NULL)
{
+ mSpeakerMgr = LLLocalSpeakerMgr::getInstance();
}
//virtual
@@ -228,11 +234,11 @@ BOOL LLNearbyChatBar::postBuild()
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
- mTalkBtn = getParent()->getChild<LLTalkButton>("talk");
+ mSpeakBtn = getParent()->getChild<LLSpeakButton>("talk");
// Speak button should be initially disabled because
// it takes some time between logging in to world and connecting to voice channel.
- mTalkBtn->setEnabled(FALSE);
+ mSpeakBtn->setEnabled(FALSE);
// Registering Chat Bar to receive Voice client status change notifications.
gVoiceClient->addObserver(this);
@@ -516,8 +522,8 @@ void LLNearbyChatBar::displaySpeakingIndicator()
LLUUID id;
id.setNull();
- mSpeakerMgr.update(TRUE);
- mSpeakerMgr.getSpeakerList(&speaker_list, FALSE);
+ mSpeakerMgr->update(TRUE);
+ mSpeakerMgr->getSpeakerList(&speaker_list, FALSE);
for (LLSpeakerMgr::speaker_list_t::iterator i = speaker_list.begin(); i != speaker_list.end(); ++i)
{
@@ -691,7 +697,7 @@ LLWString LLNearbyChatBar::stripChannelNumber(const LLWString &mesg, S32* channe
void LLNearbyChatBar::setPTTState(bool state)
{
- mTalkBtn->setSpeakBtnToggleState(state);
+ mSpeakBtn->setSpeakBtnToggleState(state);
}
void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel)
@@ -747,7 +753,7 @@ void LLNearbyChatBar::onChange(EStatusType status, const std::string &channelURI
break;
}
- mTalkBtn->setEnabled(enable);
+ mSpeakBtn->setEnabled(enable);
}
// Creating the object registers with the dispatcher.