Changeset 6353
- Timestamp:
- 14/01/10 15:10:39 (2 years ago)
- Location:
- trunk/EDIT4
- Files:
-
- 7 modified
-
ED4_cursor.cxx (modified) (5 diffs)
-
ED4_main.cxx (modified) (1 diff)
-
ED4_no_class.cxx (modified) (1 diff)
-
ED4_root.cxx (modified) (2 diffs)
-
EDB_root_bact.cxx (modified) (3 diffs)
-
ed4_class.hxx (modified) (1 diff)
-
ed4_defs.hxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/EDIT4/ED4_cursor.cxx
r6347 r6353 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 %i 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 %i 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 { … … 698 710 aw_status("Loading species..."); 699 711 700 all_found = 0; 701 not_found_message = GBS_stropen(1000); 702 GBS_strcat(not_found_message,"Species not found: "); 712 ED4_init_notFoundMessage(); 703 713 704 714 while (gb_species) { … … 754 764 aw_message(GBS_global_string("Loaded %i of %i marked species.", inserted, marked)); 755 765 756 { 757 char *out_message = GBS_strclose(not_found_message); 758 not_found_message = 0; 759 if (all_found != 0) aw_message(out_message); 760 free(out_message); 761 } 762 766 ED4_finish_and_show_notFoundMessage(); 767 763 768 if (inserted) { 764 769 /* new AAseqTerminals should be created if it is in ProtView mode */ -
trunk/EDIT4/ED4_main.cxx
r6347 r6353 51 51 int MAXINFOWIDTH; // # of pixels used to display sequence info ("CONS", "4data", etc.) 52 52 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 loading53 long ED4_counter = 0; 54 55 long not_found_counter; // nr of species which haven't been found 56 56 GBS_strstruct *not_found_message; 57 long max_seq_terminal_length; // global maximum of sequence terminal length 58 ED4_EDITMODI awar_edit_mode; 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) 57 58 long max_seq_terminal_length; // global maximum of sequence terminal length 59 ED4_EDITMODI awar_edit_mode; 60 long awar_edit_direction; 61 bool move_cursor; // only needed for editing in consensus 62 bool DRAW; 63 bool last_window_reached; // needed for refreshing all windows (if TRUE refresh/...-flags will be cleared) 63 64 64 65 void ED4_config_change_cb(AW_root *) -
trunk/EDIT4/ED4_no_class.cxx
r6348 r6353 1280 1280 ED4_calc_terminal_extentions(); 1281 1281 1282 all_found = 0;1283 species_read = 0;1284 1282 max_seq_terminal_length = 0; 1285 not_found_message = GBS_stropen(1000);1286 GBS_strcat(not_found_message,"Some species not found:\n");1283 1284 ED4_init_notFoundMessage(); 1287 1285 1288 1286 -
trunk/EDIT4/ED4_root.cxx
r6348 r6353 660 660 aw_root->add_timed_callback(2000,ED4_timer,(AW_CL)0,(AW_CL)0); 661 661 662 char *out_message = GBS_strclose(not_found_message); 663 not_found_message = 0; 664 if (all_found != 0) aw_message(out_message); 665 free(out_message); 662 ED4_finish_and_show_notFoundMessage(); 666 663 667 664 return ( ED4_R_OK ); … … 1879 1876 DRAW = 1; 1880 1877 move_cursor = 0; 1881 all_found = 0;1882 species_read = 0;1883 1878 max_seq_terminal_length = 0; 1884 1879 1885 not_found_message = GBS_stropen(1000); 1886 1887 GBS_strcat(not_found_message,"Some species not found:\n"); 1880 ED4_init_notFoundMessage(); 1888 1881 1889 1882 return ( new_window->aww ); -
trunk/EDIT4/EDB_root_bact.cxx
r6348 r6353 71 71 } 72 72 73 74 73 if (!gb_datamode) { // didn't find this species 75 74 char dummy[150]; 76 all_found++; 77 sprintf(dummy,"%ld. %s\n",all_found, str); 78 GBS_strcat(not_found_message,dummy); 75 not_found_counter++; 76 if (not_found_counter <= MAX_SHOWN_MISSING_SPECIES) { 77 sprintf(dummy,"%ld. %s\n", not_found_counter, str); 78 GBS_strcat(not_found_message,dummy); 79 } 79 80 return ED4_R_BREAK; 80 81 } 81 82 82 // check whether sequence has data in desired alignment83 // check whether sequence has data in desired alignment 83 84 bool has_alignment = 0 != GB_entry(gb_datamode,ED4_ROOT->alignment_name); 84 85 if (!has_alignment) { 85 86 if (datamode == ED4_D_SPECIES) { // only warn about species w/o data (SAIs are skipped silently) 86 87 char dummy[150]; 87 all_found++; 88 sprintf(dummy,"%ld. %s (no data in alignment)\n",all_found, str); 89 GBS_strcat(not_found_message,dummy); 88 not_found_counter++; 89 if (not_found_counter <= MAX_SHOWN_MISSING_SPECIES) { 90 sprintf(dummy,"%ld. %s (no data in alignment)\n", not_found_counter, str); 91 GBS_strcat(not_found_message,dummy); 92 } 90 93 } 91 94 return ED4_R_BREAK; … … 134 137 local_count_position += max(name_coords, seq_coords); 135 138 name_coords = seq_coords = 0; 136 species_read ++;137 139 138 140 if (!(multi_species_manager->flag.hidden)) { … … 577 579 sequence_terminal->parent->resize_requested_by_child(); 578 580 579 species_read ++;580 581 (*y) += height_terminal + height_spacer; 581 582 -
trunk/EDIT4/ed4_class.hxx
r6347 r6353 1817 1817 void ED4_selected_SAI_changed_cb (AW_root *aw_root); 1818 1818 1819 void ED4_init_notFoundMessage(); 1820 void ED4_finish_and_show_notFoundMessage(); 1821 1819 1822 extern int ED4_elements_in_species_container; // # of elements in species container 1820 1823 void ED4_undo_redo (AW_window*, AW_CL undo_type); -
trunk/EDIT4/ed4_defs.hxx
r6284 r6353 37 37 extern int SEQ_TERM_TEXT_YOFFSET; 38 38 39 extern int MAXSEQUENCECHARACTERLENGTH; // greatest # of characters in a sequence string terminal 40 extern int MAXSPECIESWIDTH; 41 extern int MAXINFOWIDTH; 42 extern long ED4_counter; 43 extern long all_found; // nr of species which haven't been found 44 extern long species_read; // nr of species read; important during loading 45 extern GBS_strstruct *not_found_message; 46 extern long max_seq_terminal_length; // global maximum of sequence terminal length 47 extern ED4_EDITMODI awar_edit_mode; 48 extern long awar_edit_direction; 49 extern bool move_cursor; //only needed for editing in consensus 50 extern bool DRAW; 51 extern bool last_window_reached; //only needed for refreshing all windows 39 extern int MAXSEQUENCECHARACTERLENGTH; // greatest # of characters in a sequence string terminal 40 extern int MAXSPECIESWIDTH; 41 extern int MAXINFOWIDTH; 42 extern long ED4_counter; 43 44 // use ED4_init_notFoundMessage and ED4_finish_and_show_notFoundMessage to 45 // modify the following elements 46 #define MAX_SHOWN_MISSING_SPECIES 200 // limit no of missing species/data printed into not_found_message 47 extern long not_found_counter; // nr of species which haven't been found 48 extern GBS_strstruct *not_found_message; // error message containing (some) missing/unloadable species 49 50 extern long max_seq_terminal_length; // global maximum of sequence terminal length 51 extern ED4_EDITMODI awar_edit_mode; 52 extern long awar_edit_direction; 53 extern bool move_cursor; //only needed for editing in consensus 54 extern bool DRAW; 55 extern bool last_window_reached; //only needed for refreshing all windows 52 56 53 57 // globally used defines and flags
