Changeset 6141 for trunk/AWT/AWT_db_browser.cxx
- Timestamp:
- 14/08/09 16:29:27 (3 years ago)
- Files:
-
- 1 modified
-
trunk/AWT/AWT_db_browser.cxx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/AWT/AWT_db_browser.cxx
r6075 r6141 561 561 if (!is_root) aww->insert_selection(id, GBS_global_string("%-*s parent container", maxkeylen, ".."), BROWSE_CMD_GO_UP); 562 562 563 // collect child sand sort them564 565 vector<list_entry> sorted_child s;563 // collect children and sort them 564 565 vector<list_entry> sorted_children; 566 566 567 567 for (GBDATA *child = GB_child(node); child; child = GB_nextChild(child)) { … … 580 580 char *content = 0; 581 581 if (entry.type == GB_DB) { 582 // the child slisted here are displayed behind the container entry583 const char *known_child s[] = { "@name", "name", "key_name", "alignment_name", "group_name", "key_text", 0 };584 for (int i = 0; known_child s[i]; ++i) {585 GBDATA *gb_known = GB_entry(entry.gbd, known_child s[i]);582 // the children listed here are displayed behind the container entry 583 const char *known_children[] = { "@name", "name", "key_name", "alignment_name", "group_name", "key_text", 0 }; 584 for (int i = 0; known_children[i]; ++i) { 585 GBDATA *gb_known = GB_entry(entry.gbd, known_children[i]); 586 586 587 587 if (gb_known && GB_read_type(gb_known) != GB_DB && GB_nextEntry(gb_known) == 0) { // exactly one child exits 588 content = GBS_global_string_copy("[%s=%s]", known_child s[i], GB_read_as_string(gb_known));588 content = GBS_global_string_copy("[%s=%s]", known_children[i], GB_read_as_string(gb_known)); 589 589 break; 590 590 } … … 609 609 free(content); 610 610 611 sorted_child s.push_back(entry);611 sorted_children.push_back(entry); 612 612 } 613 613 614 614 list_entry::sort_order = (SortOrder)aw_root->awar(AWAR_DBB_ORDER)->read_int(); 615 615 if (list_entry::sort_order != SORT_NONE) { 616 sort(sorted_child s.begin(), sorted_childs.end());617 } 618 619 for (vector<list_entry>::iterator ch = sorted_child s.begin(); ch != sorted_childs.end(); ++ch) {616 sort(sorted_children.begin(), sorted_children.end()); 617 } 618 619 for (vector<list_entry>::iterator ch = sorted_children.begin(); ch != sorted_children.end(); ++ch) { 620 620 const list_entry& entry = *ch; 621 621 const char *key_name = entry.key_name;
