Changeset 6358 for branches/stable_5.0
- Timestamp:
- 19/01/10 14:11:52 (2 years ago)
- Location:
- branches/stable_5.0
- Files:
-
- 8 modified
-
EDIT4/ED4_cursor.cxx (modified) (5 diffs)
-
EDIT4/ED4_main.cxx (modified) (2 diffs)
-
EDIT4/ED4_no_class.cxx (modified) (1 diff)
-
EDIT4/ED4_root.cxx (modified) (2 diffs)
-
EDIT4/EDB_root_bact.cxx (modified) (3 diffs)
-
EDIT4/ed4_class.hxx (modified) (1 diff)
-
EDIT4/ed4_defs.hxx (modified) (1 diff)
-
NTREE/NT_edconf.cxx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/stable_5.0/EDIT4/ED4_cursor.cxx
r6109 r6358 592 592 } 593 593 594 void 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 } 599 void 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 594 613 void ED4_get_and_jump_to_species(GB_CSTR species_name) 595 614 { … … 608 627 ED4_index lot = 0; 609 628 610 all_found = 0; 611 not_found_message = GBS_stropen(1000); 612 GBS_strcat(not_found_message,"Species not found: "); 629 ED4_init_notFoundMessage(); 613 630 614 631 sprintf(string, "-L%s", species_name); … … 618 635 loaded = 1; 619 636 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(); 626 638 627 639 { … … 699 711 aw_status("Loading species..."); 700 712 701 all_found = 0; 702 not_found_message = GBS_stropen(1000); 703 GBS_strcat(not_found_message,"Species not found: "); 713 ED4_init_notFoundMessage(); 704 714 705 715 while (gb_species) { … … 755 765 aw_message(GBS_global_string("Loaded %i of %i marked species.", inserted, marked)); 756 766 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 764 769 if (inserted) { 765 770 /* new AAseqTerminals should be created if it is in ProtView mode */ -
branches/stable_5.0/EDIT4/ED4_main.cxx
r6169 r6358 52 52 53 53 long ED4_counter = 0; 54 long all_found; // nr of species which haven't been found 55 long species_read; // nr of species read; important during loading 54 size_t not_found_counter; // nr of species which haven't been found 56 55 GBS_strstruct *not_found_message; 57 long max_seq_terminal_length; // global maximum of sequence terminal length 58 ED4_EDITMODI awar_edit_modus; 59 long awar_edit_direction; 60 bool move_cursor; // only needed for editing in consensus 61 bool DRAW; 62 bool last_window_reached; // needed for refreshing all windows (if TRUE refresh/...-flags will be cleared) 56 57 long max_seq_terminal_length; // global maximum of sequence terminal length 58 ED4_EDITMODI awar_edit_modus; 59 long awar_edit_direction; 60 bool move_cursor; // only needed for editing in consensus 61 bool DRAW; 62 bool last_window_reached; // needed for refreshing all windows (if TRUE refresh/...-flags will be cleared) 63 63 64 64 size_t status_count_total; // used for consensus progress bar … … 69 69 void ED4_config_change_cb(AW_root *) 70 70 { 71 72 71 // @@@ FIXME: ok to be empty ? check! 73 72 } -
branches/stable_5.0/EDIT4/ED4_no_class.cxx
r6203 r6358 1316 1316 ED4_calc_terminal_extentions(); 1317 1317 1318 all_found = 0;1319 species_read = 0;1320 1318 max_seq_terminal_length = 0; 1321 not_found_message = GBS_stropen(1000);1322 GBS_strcat(not_found_message,"Some species not found:\n");1319 1320 ED4_init_notFoundMessage(); 1323 1321 1324 1322 -
branches/stable_5.0/EDIT4/ED4_root.cxx
r6169 r6358 732 732 aw_root->add_timed_callback(2000,ED4_timer,(AW_CL)0,(AW_CL)0); 733 733 734 char *out_message = GBS_strclose(not_found_message); 735 not_found_message = 0; 736 if (all_found != 0) aw_message(out_message); 737 free(out_message); 734 ED4_finish_and_show_notFoundMessage(); 738 735 739 736 return ( ED4_R_OK ); … … 1969 1966 DRAW = 1; 1970 1967 move_cursor = 0; 1971 all_found = 0;1972 species_read = 0;1973 1968 max_seq_terminal_length = 0; 1974 1969 1975 not_found_message = GBS_stropen(1000); 1976 1977 GBS_strcat(not_found_message,"Some species not found:\n"); 1970 ED4_init_notFoundMessage(); 1978 1971 1979 1972 return ( new_window->aww ); -
branches/stable_5.0/EDIT4/EDB_root_bact.cxx
r5929 r6358 75 75 } 76 76 77 78 77 if (!gb_datamode) { // didn't find this species 79 78 char dummy[150]; 80 all_found++; 81 sprintf(dummy,"%ld. %s\n",all_found, str); 82 GBS_strcat(not_found_message,dummy); 79 not_found_counter++; 80 if (not_found_counter <= MAX_SHOWN_MISSING_SPECIES) { 81 sprintf(dummy,"%zu. %s\n", not_found_counter, str); 82 GBS_strcat(not_found_message,dummy); 83 } 83 84 return ED4_R_BREAK; 84 85 } 85 86 86 // check whether sequence has data in desired alignment87 // check whether sequence has data in desired alignment 87 88 bool has_alignment = 0 != GB_entry(gb_datamode,ED4_ROOT->alignment_name); 88 89 if (!has_alignment) { 89 90 if (datamode == ED4_D_SPECIES) { // only warn about species w/o data (SAIs are skipped silently) 90 91 char dummy[150]; 91 all_found++; 92 sprintf(dummy,"%ld. %s (no data in alignment)\n",all_found, str); 93 GBS_strcat(not_found_message,dummy); 92 not_found_counter++; 93 if (not_found_counter <= MAX_SHOWN_MISSING_SPECIES) { 94 sprintf(dummy,"%zu. %s (no data in alignment)\n", not_found_counter, str); 95 GBS_strcat(not_found_message,dummy); 96 } 94 97 } 95 98 return ED4_R_BREAK; … … 138 141 local_count_position += max(name_coords, seq_coords); 139 142 name_coords = seq_coords = 0; 140 species_read ++;141 143 142 144 if (!(multi_species_manager->flag.hidden)) { … … 586 588 sequence_terminal->parent->resize_requested_by_child(); 587 589 588 species_read ++;589 590 (*y) += height_terminal + height_spacer; 590 591 -
branches/stable_5.0/EDIT4/ed4_class.hxx
r5894 r6358 1966 1966 void ED4_selected_SAI_changed_cb (AW_root *aw_root); 1967 1967 1968 void ED4_init_notFoundMessage(); 1969 void ED4_finish_and_show_notFoundMessage(); 1970 1968 1971 extern int ED4_elements_in_species_container; // # of elements in species container 1969 1972 void ED4_undo_redo (AW_window*, AW_CL undo_type); -
branches/stable_5.0/EDIT4/ed4_defs.hxx
r5901 r6358 38 38 extern int SEQ_TERM_TEXT_YOFFSET; 39 39 40 extern int MAXSEQUENCECHARACTERLENGTH; // greatest # of characters in a sequence string terminal 41 extern int MAXSPECIESWIDTH; 42 extern int MAXINFOWIDTH; 43 extern long ED4_counter; 44 extern long all_found; // nr of species which haven't been found 45 extern long species_read; // nr of species read; important during loading 46 extern GBS_strstruct *not_found_message; 47 extern long max_seq_terminal_length; // global maximum of sequence terminal length 48 extern ED4_EDITMODI awar_edit_modus; 49 extern long awar_edit_direction; 50 extern bool move_cursor; //only needed for editing in consensus 51 extern bool DRAW; 52 extern bool last_window_reached; //only needed for refreshing all windows 40 extern int MAXSEQUENCECHARACTERLENGTH; // greatest # of characters in a sequence string terminal 41 extern int MAXSPECIESWIDTH; 42 extern int MAXINFOWIDTH; 43 extern long ED4_counter; 44 45 // use ED4_init_notFoundMessage and ED4_finish_and_show_notFoundMessage to 46 // modify the following elements 47 #define MAX_SHOWN_MISSING_SPECIES 200U // limit no of missing species/data printed into not_found_message 48 extern size_t not_found_counter; // nr of species which haven't been found 49 extern GBS_strstruct *not_found_message; // error message containing (some) missing/unloadable species 50 51 extern long max_seq_terminal_length; // global maximum of sequence terminal length 52 extern ED4_EDITMODI awar_edit_modus; 53 extern long awar_edit_direction; 54 extern bool move_cursor; //only needed for editing in consensus 55 extern bool DRAW; 56 extern bool last_window_reached; //only needed for refreshing all windows 53 57 54 58 extern size_t status_count_total; // used for consensus progress bar -
branches/stable_5.0/NTREE/NT_edconf.cxx
r6287 r6358 399 399 GBDATA *gb_configuration = GBT_find_configuration(GLOBAL_gb_main,cn); 400 400 if (!gb_configuration){ 401 aw_message(GBS_global_string("Configuration '%s' not found in the database", cn));401 aw_message(GBS_global_string("Configuration '%s' not found in the database", cn)); 402 402 } 403 403 else { 404 GBDATA *gb_middle_area = GB_search(gb_configuration,"middle_area",GB_STRING); 405 char *md = 0; 406 if (gb_middle_area){ 404 GBDATA *gb_middle_area = GB_search(gb_configuration,"middle_area",GB_STRING); 405 char *md = 0; 406 size_t unknown_species = 0; 407 408 if (gb_middle_area) { 407 409 extractType ext_type = extractType(cl_extractType); 408 410 … … 455 457 GB_write_flag(gb_species,mark); 456 458 } 459 else { 460 unknown_species++; 461 } 457 462 } 458 463 } … … 460 465 GBS_free_hash(was_marked); 461 466 } 467 468 if (unknown_species>0) { 469 aw_message(GBS_global_string("configuration '%s' contains %zu unknown species", cn, unknown_species)); 470 } 471 462 472 free(md); 463 473 }
