From 31e7c77a411d94bc87f0232588b339149bb29a49 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 28 Sep 2008 17:21:23 -0500 Subject: Second Life viewer sources 1.21.3-RC --- linden/indra/newview/llchatbar.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'linden/indra/newview/llchatbar.cpp') diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 3a6c8cf..31fa653 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/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 unique; @@ -245,20 +244,21 @@ void LLChatBar::refreshGestures() std::map ::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(); } } } -- cgit v1.1