diff options
| author | Josh Bell <josh@lindenlab.com> | 2008-01-17 23:29:26 +0000 |
|---|---|---|
| committer | Josh Bell <josh@lindenlab.com> | 2008-01-17 23:29:26 +0000 |
| commit | 3cb5c6864e0e19de30f3bba0f9fafd1ac695bfd1 (patch) | |
| tree | c3016cffcea78a114ee6713a6a9c4789953123cb /indra/newview/llnamelistctrl.cpp | |
| parent | 9cb55b05c29124c4b83a4ec22aba4a4f3290d52a (diff) | |
QAR-211: Logical merge of:
svn merge -r 76578:76594 svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/linuxbhear-based-on-release-r76573
svn merge -r 77016:77668 svn+ssh://svn.lindenlab.com/svn/linden/branches/scrolllist_fixes
svn merge -r 75889:75948 svn+ssh://svn.lindenlab.com/svn/linden/branches/simcrash-economy-fix
svn merge -r 77312:77356 svn+ssh://svn.lindenlab.com/svn/linden/branches/revoke-gods
plus addition to MANIFEST for revoke-gods
Actual merge:
svn merge -r 77525:77696 svn+ssh://svn.lindenlab.com/svn/linden/qa/combo-merge-2008-01-15-a
* QAR-177 Linux Voice Support Merge BuildMe
* QAR-197 merge of scrolllist_fixes into release for 1.19.0 (plus QAR-216 additions)
* QAR-194 simcrash-economy-fix
* QAR-201 Revoke gods added to deploy
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
| -rw-r--r-- | indra/newview/llnamelistctrl.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index a47721be9d..9dd37cf47d 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -332,9 +332,6 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto BOOL draw_heading = FALSE; node->getAttributeBOOL("draw_heading", draw_heading); - BOOL collapse_empty_columns = FALSE; - node->getAttributeBOOL("collapse_empty_columns", collapse_empty_columns); - S32 name_column_index = 0; node->getAttributeS32("name_column_index", name_column_index); @@ -355,7 +352,6 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto node->getAttributeS32("heading_height", heading_height); name_list->setHeadingHeight(heading_height); } - name_list->setCollapseEmptyColumns(collapse_empty_columns); BOOL allow_calling_card_drop = FALSE; if (node->getAttributeBOOL("allow_calling_card_drop", allow_calling_card_drop)) @@ -369,6 +365,7 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto LLSD columns; S32 index = 0; + S32 total_static = 0; LLXMLNodePtr child; for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { @@ -380,6 +377,13 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto LLString columnname(labelname); child->getAttributeString("name", columnname); + BOOL columndynamicwidth = FALSE; + child->getAttributeBOOL("dynamicwidth", columndynamicwidth); + + LLString sortname(columnname); + child->getAttributeString("sort", sortname); + + S32 columnwidth = -1; if (child->hasAttribute("relwidth")) { F32 columnrelwidth = 0.f; @@ -388,7 +392,6 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto } else { - S32 columnwidth = -1; child->getAttributeS32("width", columnwidth); columns[index]["width"] = columnwidth; } @@ -396,14 +399,21 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto LLFontGL::HAlign h_align = LLFontGL::LEFT; h_align = LLView::selectFontHAlign(child); + if(!columndynamicwidth) total_static += llmax(0, columnwidth); + columns[index]["name"] = columnname; columns[index]["label"] = labelname; columns[index]["halign"] = (S32)h_align; + columns[index]["dynamicwidth"] = columndynamicwidth; + columns[index]["sort"] = sortname; + index++; } } + name_list->setTotalStaticColumnWidth(total_static); name_list->setColumnHeadings(columns); + for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { if (child->hasName("row")) @@ -453,7 +463,7 @@ LLView* LLNameListCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFacto while(token_iter != tokens.end()) { const char* line = token_iter->c_str(); - name_list->addSimpleItem(line); + name_list->addCommentText(line); ++token_iter; } |
