From 64ee599c5b54496853025df6f609764acb846248 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 25 Sep 2009 19:54:02 -0700 Subject: Temporarily disable chat channel control in chat history until it's fixed --- linden/indra/newview/llchatbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/newview/llchatbar.cpp') diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 1de3690..46024ab 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -217,7 +217,7 @@ void LLChatBar::refresh() childSetValue("History", LLFloaterChat::instanceVisible(LLSD())); - childSetValue("channel_control",( 1.f * ((S32)(getChild("channel_control")->get()))) ); + //childSetValue("channel_control",( 1.f * ((S32)(getChild("channel_control")->get()))) ); childSetEnabled("Say", mInputEditor->getText().size() > 0); childSetEnabled("Shout", mInputEditor->getText().size() > 0); -- cgit v1.1 From 3d4e223fd343d1b436f0dacdce969e548ecb4e79 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 25 Sep 2009 21:12:46 -0700 Subject: Cleaned up channel control code in llchatbar.cpp some --- linden/indra/newview/llchatbar.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'linden/indra/newview/llchatbar.cpp') diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 46024ab..8c22931 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp @@ -102,7 +102,7 @@ private: LLChatBar::LLChatBar() : LLPanel(LLStringUtil::null, LLRect(), BORDER_NO), - mChannelControl(FALSE), + mChanCtrlEnabled(FALSE), mInputEditor(NULL), mGestureLabelTimer(), mLastSpecialChatChannel(0), @@ -156,6 +156,8 @@ BOOL LLChatBar::postBuild() mInputEditor->setEnableLineHistory(TRUE); } + mChannelControl = getChild("channel_control"); + toggleChannelControl(); mIsBuilt = TRUE; @@ -217,7 +219,7 @@ void LLChatBar::refresh() childSetValue("History", LLFloaterChat::instanceVisible(LLSD())); - //childSetValue("channel_control",( 1.f * ((S32)(getChild("channel_control")->get()))) ); + //childSetValue("channel_control",( 1.f * ((S32)(mChannelControl->get()))) ); childSetEnabled("Say", mInputEditor->getText().size() > 0); childSetEnabled("Shout", mInputEditor->getText().size() > 0); @@ -378,7 +380,7 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel) } else { - if (!mChannelControl) + if (!mChanCtrlEnabled) { // This is normal chat. *channel = 0; @@ -398,7 +400,7 @@ void LLChatBar::sendChat( EChatType type ) // store sent line in history, duplicates will get filtered if (mInputEditor) mInputEditor->updateHistory(); // Check if this is destined for another channel - S32 channel = mChannelControl ? (S32)(getChild("channel_control")->get()) : 0; + S32 channel = mChanCtrlEnabled ? (S32)(mChannelControl->get()) : 0; stripChannelNumber(text, &channel); @@ -440,9 +442,9 @@ void LLChatBar::sendChat( EChatType type ) void LLChatBar::toggleChannelControl() { LLRect input_rect = mInputEditor->getRect(); - S32 chan_width = getChild("channel_control")->getRect().getWidth(); + S32 chan_width = mChannelControl->getRect().getWidth(); BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect"); - BOOL control = getChild("channel_control")->getVisible(); + BOOL control = mChannelControl->getVisible(); if (visible && !control) { @@ -459,7 +461,7 @@ void LLChatBar::toggleChannelControl() childSetVisible("channel_control", visible); childSetEnabled("channel_control", visible); - mChannelControl = visible; + mChanCtrlEnabled = visible; } @@ -615,7 +617,7 @@ void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type, void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) { // Look for "/20 foo" channel chats. - S32 channel = mChannelControl ? (S32)(getChild("channel_control")->get()) : 0; + S32 channel = mChanCtrlEnabled ? (S32)(mChannelControl->get()) : 0; LLWString out_text = stripChannelNumber(wtext, &channel); std::string utf8_out_text = wstring_to_utf8str(out_text); -- cgit v1.1