Changeset 905

Show
Ignore:
Timestamp:
03.02.2000 14:49:35 (20 years ago)
Author:
sjboddie
Message:

fixed up some of the preferences stuff

Files:
1 modified

Legend:

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

    r875 r905  
    2828/* 
    2929   $Log$ 
     30   Revision 1.26  2000/02/03 01:49:35  sjboddie 
     31   fixed up some of the preferences stuff 
     32 
    3033   Revision 1.25  2000/01/26 20:11:04  sjboddie 
    3134   added some collection specific help text 
     
    325328      text_tarray::const_iterator col_here = cinfo.ccsCols.begin(); 
    326329      text_tarray::const_iterator col_end = cinfo.ccsCols.end(); 
     330      int count = 0; 
    327331      while (col_here != col_end) { 
    328332    text_t colname; 
     
    332336      ColInfoResponse_t this_cinfo; 
    333337      collectproto->get_collectinfo (*col_here, this_cinfo, err, logout); 
     338      if (err != noError) {col_here ++; continue;} 
    334339      colname = this_cinfo.collectionmeta["collectionname"]; 
    335340    } 
    336341 
     342    count ++; 
    337343    collectionoption += "<input type=checkbox name=\"cc\" value=\"" +  
    338344      *col_here + "\" onClick=\"updatecc(\'" + *col_here + "\');\"> " + 
     
    340346    col_here ++; 
    341347      } 
    342  
    343       disp.setmacro ("collectionoption", "preferences", collectionoption); 
     348       
     349      if (count > 1) 
     350    disp.setmacro ("collectionoption", "preferences", collectionoption); 
    344351    } 
    345352 
     
    472479    text_tarray::const_iterator end = cinfo.ccsCols.end(); 
    473480    bool first = true; 
     481    int count = 0; 
    474482    while (here != end) { 
    475483      if (*here == arg_c) { 
     
    479487        ColInfoResponse_t this_cinfo; 
    480488        collectproto->get_collectinfo (*here, this_cinfo, err, logout); 
    481         if (err == noError) { 
    482           if (!first) textsubcollections += "<br>"; 
    483           textsubcollections += "\n" + this_cinfo.collectionmeta["collectionname"] + "\n"; 
    484         } 
     489        if (err != noError) {here ++; continue;} 
     490        if (!first) textsubcollections += "<br>"; 
     491        textsubcollections += "\n" + this_cinfo.collectionmeta["collectionname"] + "\n"; 
    485492      } 
     493      count ++; 
    486494      first = false; 
    487495      here ++; 
    488496    } 
    489497    textsubcollections += "_textsubcols2_"; 
    490     disp.setmacro ("textsubcollections", "about", textsubcollections); 
     498    if (count > 1)  
     499      disp.setmacro ("textsubcollections", "about", textsubcollections); 
    491500      } 
    492501    }