Show
Ignore:
Timestamp:
19/01/10 14:11:52 (2 years ago)
Author:
westram
Message:
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/stable_5.0/EDIT4/ED4_cursor.cxx

    r6109 r6358  
    592592} 
    593593 
     594void ED4_init_notFoundMessage() { 
     595    not_found_counter = 0; 
     596    not_found_message = GBS_stropen(10000); 
     597    // GBS_strcat(not_found_message,"Species not found: "); 
     598} 
     599void ED4_finish_and_show_notFoundMessage() { 
     600    if (not_found_counter != 0) { 
     601        GBS_strcat(not_found_message, GBS_global_string("(skipped display of %zu more species)\n", not_found_counter-MAX_SHOWN_MISSING_SPECIES)); 
     602        char *out_message = GBS_strclose(not_found_message); 
     603        aw_message(out_message); 
     604        aw_message(GBS_global_string("Couldn't load %zu species:", not_found_counter)); 
     605        free(out_message); 
     606    } 
     607    else { 
     608        GBS_strforget(not_found_message); 
     609    } 
     610    not_found_message = 0; 
     611} 
     612 
    594613void ED4_get_and_jump_to_species(GB_CSTR species_name) 
    595614{ 
     
    608627        ED4_index                  lot                 = 0; 
    609628 
    610         all_found         = 0; 
    611         not_found_message = GBS_stropen(1000); 
    612         GBS_strcat(not_found_message,"Species not found: "); 
     629        ED4_init_notFoundMessage(); 
    613630 
    614631        sprintf(string, "-L%s", species_name); 
     
    618635        loaded = 1; 
    619636 
    620         { 
    621             char *out_message = GBS_strclose(not_found_message); 
    622             not_found_message = 0; 
    623             if (all_found != 0) aw_message(out_message); 
    624             free(out_message); 
    625         } 
     637        ED4_finish_and_show_notFoundMessage(); 
    626638 
    627639        { 
     
    699711        aw_status("Loading species..."); 
    700712 
    701         all_found         = 0; 
    702         not_found_message = GBS_stropen(1000); 
    703         GBS_strcat(not_found_message,"Species not found: "); 
     713        ED4_init_notFoundMessage(); 
    704714 
    705715        while (gb_species) { 
     
    755765        aw_message(GBS_global_string("Loaded %i of %i marked species.", inserted, marked)); 
    756766 
    757         { 
    758             char *out_message = GBS_strclose(not_found_message); 
    759             not_found_message = 0; 
    760             if (all_found != 0) aw_message(out_message); 
    761             free(out_message); 
    762         } 
    763  
     767        ED4_finish_and_show_notFoundMessage(); 
     768         
    764769        if (inserted) { 
    765770            /* new AAseqTerminals should be created if it is in ProtView mode */