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.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 836ae9a0cf..4b961db5f9 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -47,6 +47,7 @@
#include "llwindow.h"
#include "llviewerwindow.h"
#include "llrootview.h"
+#include "llviewerchat.h"
S32 LLNearbyChatBar::sLastSpecialChatChannel = 0;
@@ -157,6 +158,16 @@ BOOL LLGestureComboList::handleKeyHere(KEY key, MASK mask)
return handled;
}
+void LLGestureComboList::draw()
+{
+ LLUICtrl::draw();
+
+ if(mButton->getToggleState())
+ {
+ showList();
+ }
+}
+
void LLGestureComboList::showList()
{
LLRect rect = mList->getRect();
@@ -180,6 +191,7 @@ void LLGestureComboList::showList()
// Show the list and push the button down
mButton->setToggleState(TRUE);
mList->setVisible(TRUE);
+ sendChildToFront(mList);
LLUI::addPopup(mList);
}
@@ -422,13 +434,26 @@ BOOL LLNearbyChatBar::postBuild()
mChatBox->setPassDelete(TRUE);
mChatBox->setReplaceNewlinesWithSpaces(FALSE);
mChatBox->setEnableLineHistory(TRUE);
+ mChatBox->setFont(LLViewerChat::getChatFont());
mOutputMonitor = getChild<LLOutputMonitorCtrl>("chat_zone_indicator");
mOutputMonitor->setVisible(FALSE);
+ // Register for font change notifications
+ LLViewerChat::setFontChangedCallback(boost::bind(&LLNearbyChatBar::onChatFontChange, this, _1));
+
return TRUE;
}
+void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
+{
+ // Update things with the new font whohoo
+ if (mChatBox)
+ {
+ mChatBox->setFont(fontp);
+ }
+}
+
//static
LLNearbyChatBar* LLNearbyChatBar::getInstance()
{
@@ -864,11 +889,11 @@ void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_CHAT_COUNT);
}
-class LLChatHandler : public LLCommandHandler
+class LLChatCommandHandler : public LLCommandHandler
{
public:
// not allowed from outside the app
- LLChatHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { }
+ LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { }
// Your code here
bool handle(const LLSD& tokens, const LLSD& query_map,
@@ -884,7 +909,7 @@ public:
{
S32 channel = tokens[0].asInteger();
// VWR-19499 Restrict function to chat channels greater than 0.
- if ((channel > 0) && (channel < 2147483647))
+ if ((channel > 0) && (channel < CHAT_CHANNEL_DEBUG))
{
retval = true;
// Send unescaped message, see EXT-6353.
@@ -902,6 +927,6 @@ public:
};
// Creating the object registers with the dispatcher.
-LLChatHandler gChatHandler;
+LLChatCommandHandler gChatHandler;