Ignore:
Timestamp:
2003-07-12T08:58:10+12:00 (21 years ago)
Author:
sjboddie
Message:

Replaced overloaded get_formatted_string() functions in formattools with
a single function by using a text_tmap in place of the old link, text,
icon, and highlight variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/vlistbrowserclass.cpp

    r4829 r4906  
    8383  }
    8484
     85  text_tmap options;
     86  options["link"] = link;
     87  options["icon"] = icon;
     88  if (highlight) options["highlight"] = "1";
     89  else options["highlight"] = "0";
    8590  textout << outconvert << disp
    8691      << get_formatted_string (collection, collectproto,
    8792                   section, disp, formatlistptr,
    88                    link, icon, highlight, logout);
     93                   options, logout);
    8994 
    9095  if (use_table  || colnumber > 0) textout << outconvert << "</tr></table>\n";
     
    127132  int item = 0, perline;; // set perline to 1 normally
    128133  text_t fstring;
     134
     135  text_tmap options;
     136  options["link"] = link;
     137  options["icon"] = icon;
     138  options["highlight"] = "0";
     139
    129140  if ( thissection != endsection ) { // only if there are results (else corrupts display)
    130     fstring =
    131       get_formatted_string (collection, collectproto,
    132                 *thissection, disp, formatlistptr, link, icon, false, logout);
     141    fstring = get_formatted_string (collection, collectproto, *thissection,
     142                                    disp, formatlistptr, options, logout);
    133143    // if format string
    134144    // has <td><t (e.g. <td><table>) then
     
    152162      textout << outconvert << "<tr valign=top>\n";
    153163
     164    options["link"] = link;
     165    options["icon"] = icon;
     166    if (highlight) options["highlight"] = "1";
     167    else options["highlight"] = "0";
     168   
    154169    textout << outconvert << disp
    155170        << " " << get_formatted_string (collection, collectproto, *thissection, disp,
    156                         formatlistptr, link, icon, highlight, logout);
     171                        formatlistptr, options, logout);
    157172
    158173    if ((item >= perline && use_table) || colnumber > 0) {
Note: See TracChangeset for help on using the changeset viewer.