diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-09-29 19:14:50 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-09-29 19:14:50 +0000 |
commit | d725e5b24075b2171f8a5b263969991e9b475078 (patch) | |
tree | f1422064fd0ab676dfa66d39b5d0f0b9e8ff1086 /indra/newview/llchatbar.cpp | |
parent | 66739da16407a8e56accc236bd3996c1963a6bcf (diff) |
QAR-872 Viewer 1.21 RC 3
merge viewer_1-21 96116-97380 -> release
Diffstat (limited to 'indra/newview/llchatbar.cpp')
-rw-r--r-- | indra/newview/llchatbar.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 2e542995d4..d6b2a9e28e 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -216,15 +216,14 @@ void LLChatBar::refresh() void LLChatBar::refreshGestures() { - LLCtrlListInterface* gestures = mGestureCombo ? mGestureCombo->getListInterface() : NULL; - if (mGestureCombo && gestures) + if (mGestureCombo) { //store current selection so we can maintain it std::string cur_gesture = mGestureCombo->getValue().asString(); - gestures->selectFirstItem(); + mGestureCombo->selectFirstItem(); std::string label = mGestureCombo->getValue().asString();; // clear - gestures->clearRows(); + mGestureCombo->clearRows(); // collect list of unique gestures std::map <std::string, BOOL> unique; @@ -245,20 +244,21 @@ void LLChatBar::refreshGestures() std::map <std::string, BOOL>::iterator it2; for (it2 = unique.begin(); it2 != unique.end(); ++it2) { - gestures->addSimpleElement((*it2).first); + mGestureCombo->addSimpleElement((*it2).first); } - gestures->sortByColumn(LLStringUtil::null, TRUE); - // Insert label after sorting - gestures->addSimpleElement(label, ADD_TOP); + mGestureCombo->sortByName(); + // Insert label after sorting, at top, with separator below it + mGestureCombo->addSeparator(ADD_TOP); + mGestureCombo->addSimpleElement(getString("gesture_label"), ADD_TOP); if (!cur_gesture.empty()) - { - gestures->selectByValue(LLSD(cur_gesture)); + { + mGestureCombo->selectByValue(LLSD(cur_gesture)); } else { - gestures->selectFirstItem(); + mGestureCombo->selectFirstItem(); } } } |