aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/llui/llspinctrl.cpp5
-rw-r--r--linden/indra/newview/app_settings/settings.xml16
-rw-r--r--linden/indra/newview/llchatbar.cpp18
-rw-r--r--linden/indra/newview/llchatbar.h4
-rw-r--r--linden/indra/newview/llfloaterchat.cpp2
-rw-r--r--linden/indra/newview/llprefschat.cpp2
6 files changed, 37 insertions, 10 deletions
diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp
index 51daefb..4f1ba26 100644
--- a/linden/indra/llui/llspinctrl.cpp
+++ b/linden/indra/llui/llspinctrl.cpp
@@ -468,6 +468,11 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask)
468 LLSpinCtrl::onDownBtn(this); 468 LLSpinCtrl::onDownBtn(this);
469 return TRUE; 469 return TRUE;
470 } 470 }
471 if(key == KEY_RETURN)
472 {
473 forceEditorCommit();
474 return TRUE;
475 }
471 } 476 }
472 return FALSE; 477 return FALSE;
473} 478}
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 087c92f..d0370cf 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -2776,6 +2776,22 @@
2776 <integer>0</integer> 2776 <integer>0</integer>
2777 </array> 2777 </array>
2778 </map> 2778 </map>
2779 <key>FloaterAnimationListRect</key>
2780 <map>
2781 <key>Comment</key>
2782 <string>Rectangle for Animation List</string>
2783 <key>Persist</key>
2784 <integer>1</integer>
2785 <key>Type</key>
2786 <string>Rect</string>
2787 <key>Value</key>
2788 <array>
2789 <integer>0</integer>
2790 <integer>275</integer>
2791 <integer>1000</integer>
2792 <integer>0</integer>
2793 </array>
2794 </map>
2779 <key>FloaterAudioVolumeRect</key> 2795 <key>FloaterAudioVolumeRect</key>
2780 <map> 2796 <map>
2781 <key>Comment</key> 2797 <key>Comment</key>
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp
index 1de3690..8c22931 100644
--- a/linden/indra/newview/llchatbar.cpp
+++ b/linden/indra/newview/llchatbar.cpp
@@ -102,7 +102,7 @@ private:
102 102
103LLChatBar::LLChatBar() 103LLChatBar::LLChatBar()
104: LLPanel(LLStringUtil::null, LLRect(), BORDER_NO), 104: LLPanel(LLStringUtil::null, LLRect(), BORDER_NO),
105 mChannelControl(FALSE), 105 mChanCtrlEnabled(FALSE),
106 mInputEditor(NULL), 106 mInputEditor(NULL),
107 mGestureLabelTimer(), 107 mGestureLabelTimer(),
108 mLastSpecialChatChannel(0), 108 mLastSpecialChatChannel(0),
@@ -156,6 +156,8 @@ BOOL LLChatBar::postBuild()
156 mInputEditor->setEnableLineHistory(TRUE); 156 mInputEditor->setEnableLineHistory(TRUE);
157 } 157 }
158 158
159 mChannelControl = getChild<LLSpinCtrl>("channel_control");
160
159 toggleChannelControl(); 161 toggleChannelControl();
160 162
161 mIsBuilt = TRUE; 163 mIsBuilt = TRUE;
@@ -217,7 +219,7 @@ void LLChatBar::refresh()
217 219
218 childSetValue("History", LLFloaterChat::instanceVisible(LLSD())); 220 childSetValue("History", LLFloaterChat::instanceVisible(LLSD()));
219 221
220 childSetValue("channel_control",( 1.f * ((S32)(getChild<LLSpinCtrl>("channel_control")->get()))) ); 222 //childSetValue("channel_control",( 1.f * ((S32)(mChannelControl->get()))) );
221 childSetEnabled("Say", mInputEditor->getText().size() > 0); 223 childSetEnabled("Say", mInputEditor->getText().size() > 0);
222 childSetEnabled("Shout", mInputEditor->getText().size() > 0); 224 childSetEnabled("Shout", mInputEditor->getText().size() > 0);
223 225
@@ -378,7 +380,7 @@ LLWString LLChatBar::stripChannelNumber(const LLWString &mesg, S32* channel)
378 } 380 }
379 else 381 else
380 { 382 {
381 if (!mChannelControl) 383 if (!mChanCtrlEnabled)
382 { 384 {
383 // This is normal chat. 385 // This is normal chat.
384 *channel = 0; 386 *channel = 0;
@@ -398,7 +400,7 @@ void LLChatBar::sendChat( EChatType type )
398 // store sent line in history, duplicates will get filtered 400 // store sent line in history, duplicates will get filtered
399 if (mInputEditor) mInputEditor->updateHistory(); 401 if (mInputEditor) mInputEditor->updateHistory();
400 // Check if this is destined for another channel 402 // Check if this is destined for another channel
401 S32 channel = mChannelControl ? (S32)(getChild<LLSpinCtrl>("channel_control")->get()) : 0; 403 S32 channel = mChanCtrlEnabled ? (S32)(mChannelControl->get()) : 0;
402 404
403 stripChannelNumber(text, &channel); 405 stripChannelNumber(text, &channel);
404 406
@@ -440,9 +442,9 @@ void LLChatBar::sendChat( EChatType type )
440void LLChatBar::toggleChannelControl() 442void LLChatBar::toggleChannelControl()
441{ 443{
442 LLRect input_rect = mInputEditor->getRect(); 444 LLRect input_rect = mInputEditor->getRect();
443 S32 chan_width = getChild<LLSpinCtrl>("channel_control")->getRect().getWidth(); 445 S32 chan_width = mChannelControl->getRect().getWidth();
444 BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect"); 446 BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect");
445 BOOL control = getChild<LLSpinCtrl>("channel_control")->getVisible(); 447 BOOL control = mChannelControl->getVisible();
446 448
447 if (visible && !control) 449 if (visible && !control)
448 { 450 {
@@ -459,7 +461,7 @@ void LLChatBar::toggleChannelControl()
459 461
460 childSetVisible("channel_control", visible); 462 childSetVisible("channel_control", visible);
461 childSetEnabled("channel_control", visible); 463 childSetEnabled("channel_control", visible);
462 mChannelControl = visible; 464 mChanCtrlEnabled = visible;
463} 465}
464 466
465 467
@@ -615,7 +617,7 @@ void LLChatBar::sendChatFromViewer(const std::string &utf8text, EChatType type,
615void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate) 617void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate)
616{ 618{
617 // Look for "/20 foo" channel chats. 619 // Look for "/20 foo" channel chats.
618 S32 channel = mChannelControl ? (S32)(getChild<LLSpinCtrl>("channel_control")->get()) : 0; 620 S32 channel = mChanCtrlEnabled ? (S32)(mChannelControl->get()) : 0;
619 621
620 LLWString out_text = stripChannelNumber(wtext, &channel); 622 LLWString out_text = stripChannelNumber(wtext, &channel);
621 std::string utf8_out_text = wstring_to_utf8str(out_text); 623 std::string utf8_out_text = wstring_to_utf8str(out_text);
diff --git a/linden/indra/newview/llchatbar.h b/linden/indra/newview/llchatbar.h
index 53ac233..96961ae 100644
--- a/linden/indra/newview/llchatbar.h
+++ b/linden/indra/newview/llchatbar.h
@@ -43,6 +43,7 @@ class LLUUID;
43class LLFrameTimer; 43class LLFrameTimer;
44class LLChatBarGestureObserver; 44class LLChatBarGestureObserver;
45class LLComboBox; 45class LLComboBox;
46class LLSpinCtrl;
46 47
47class LLChatBar 48class LLChatBar
48: public LLPanel 49: public LLPanel
@@ -113,7 +114,8 @@ protected:
113 LLChatBarGestureObserver* mObserver; 114 LLChatBarGestureObserver* mObserver;
114 115
115private: 116private:
116 BOOL mChannelControl; 117 BOOL mChanCtrlEnabled;
118 LLSpinCtrl* mChannelControl;
117}; 119};
118 120
119extern LLChatBar *gChatBar; 121extern LLChatBar *gChatBar;
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp
index 1f51a21..1f34ad0 100644
--- a/linden/indra/newview/llfloaterchat.cpp
+++ b/linden/indra/newview/llfloaterchat.cpp
@@ -108,6 +108,8 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed)
108 childSetVisible("Chat History Editor with mute",FALSE); 108 childSetVisible("Chat History Editor with mute",FALSE);
109 childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); 109 childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
110 setDefaultBtn("Chat"); 110 setDefaultBtn("Chat");
111
112 //toggleHistoryChannelControl(); temporarily disable until working
111} 113}
112 114
113LLFloaterChat::~LLFloaterChat() 115LLFloaterChat::~LLFloaterChat()
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index f3b7278..6e55cda 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -194,7 +194,7 @@ void LLPrefsChatImpl::apply()
194 if (gChatBar) 194 if (gChatBar)
195 { 195 {
196 gChatBar->toggleChannelControl(); 196 gChatBar->toggleChannelControl();
197 LLFloaterChat::toggleHistoryChannelControl(); 197 //LLFloaterChat::toggleHistoryChannelControl(); temporarily disable until working
198 } 198 }
199 mChatChannel = chan_check; 199 mChatChannel = chan_check;
200 } 200 }