[med-svn] r151 - trunk/packages/seaview/branches/upstream/current

Charles Plessy charles-guest at alioth.debian.org
Sat Oct 28 11:24:54 CEST 2006


Author: charles-guest
Date: 2006-10-28 11:24:54 +0200 (Sat, 28 Oct 2006)
New Revision: 151

Added:
   trunk/packages/seaview/branches/upstream/current/seaview.xcf
   trunk/packages/seaview/branches/upstream/current/seaview.xpm
Modified:
   trunk/packages/seaview/branches/upstream/current/align.cxx
   trunk/packages/seaview/branches/upstream/current/comlines.cxx
   trunk/packages/seaview/branches/upstream/current/regions.cxx
   trunk/packages/seaview/branches/upstream/current/seaview.cxx
   trunk/packages/seaview/branches/upstream/current/seaview.h
   trunk/packages/seaview/branches/upstream/current/seaview.help
   trunk/packages/seaview/branches/upstream/current/xfmatpt.cxx
Log:
Load /tmp/tmp.Yyq7kL/seaview-20061005 into
trunk/packages/seaview/branches/upstream/current.


Modified: trunk/packages/seaview/branches/upstream/current/align.cxx
===================================================================
--- trunk/packages/seaview/branches/upstream/current/align.cxx	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/align.cxx	2006-10-28 09:24:54 UTC (rev 151)
@@ -632,7 +632,9 @@
 	GetFrontProcess(&newpsn); // the newly started Terminal
     sleep(2);
 	fl_cursor(FL_CURSOR_DEFAULT, FL_BLACK, FL_BLACK);
-	status = fl_ask("Wait for alignment completion in Terminal window.\nIs it completed ?") ? 0 : 1 ; 
+	status = ask_with_custom_yesno(
+		"Wait for alignment completion in Terminal window.",
+		"Alignment completed","Ignore of interrupt alignment") ? 0 : 1 ; 
 	// try to kill only a newly started Terminal and not something else
 	if( FSCompareFSRefs(&frontproc, &myterm) == noErr) KillProcess(&newpsn);
 	}

Modified: trunk/packages/seaview/branches/upstream/current/comlines.cxx
===================================================================
--- trunk/packages/seaview/branches/upstream/current/comlines.cxx	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/comlines.cxx	2006-10-28 09:24:54 UTC (rev 151)
@@ -310,7 +310,7 @@
 else if(reponse == DELETE_FOOTER) {
 	if(view->tot_comment_lines == 0 || view->active_comment_line == 0)
 		return;
-	if(! fl_ask("Confirm deletion?") ) return;
+	if(! ask_with_custom_yesno("Confirm deletion?", "Delete", "Cancel") ) return;
 	free(view->comment_line[view->active_comment_line - 1]);
 	free(view->comment_name[view->active_comment_line - 1]);
 	for(num = view->active_comment_line; num < view->tot_comment_lines;

Modified: trunk/packages/seaview/branches/upstream/current/regions.cxx
===================================================================
--- trunk/packages/seaview/branches/upstream/current/regions.cxx	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/regions.cxx	2006-10-28 09:24:54 UTC (rev 151)
@@ -210,7 +210,7 @@
 	sprintf(question, 
 		"Do you want to save changes\nin current sites selection?\n%s",
 		list->element->name);
-	tmp = fl_ask(question);
+	tmp = ask_with_custom_yesno(question, "Save", "Cancel");
 	}
 else	tmp = TRUE;
 if(tmp) list->element = copy_region(view->active_region, list->element);
@@ -433,7 +433,7 @@
 	if(tmp > 1) while( --tmp) list= list->next;
 	sprintf(question, "Confirm deletion of region:\n%s", 
 		list->element->name);
-	if( fl_ask(question) ) {
+	if( ask_with_custom_yesno(question, "Delete", "Cancel") ) {
 		delete_region(view, valeur);
 		view->DNA_obj->redraw();
 		items[0].activate();

Modified: trunk/packages/seaview/branches/upstream/current/seaview.cxx
===================================================================
--- trunk/packages/seaview/branches/upstream/current/seaview.cxx	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/seaview.cxx	2006-10-28 09:24:54 UTC (rev 151)
@@ -640,7 +640,10 @@
 int background, foreground;
 static char lettre[]="A";
 static char cursor_coord[100];
-
+Fl_Menu_Button *menu_props = (Fl_Menu_Button *)view->bouton_props;
+props_menu_parts *props_parts = (props_menu_parts *)menu_props->user_data();
+int byreference = ((Fl_Menu_Item *)menu_props->menu() + props_parts->reference)->value();
+		
 if( (!cursor_in_comment) && (seq == 0 || site > view->each_length[seq-1] + 1) ) 
 	return;
 cursor_x = site - view->first_site;
@@ -661,6 +664,10 @@
 	y = view->y_seq + cursor_y * view->line_height;
 	x = view->x_seq + cursor_x * view->char_width;
 	lettre[0] = view->sequence[seq-1][site-1];
+	if(!view->allow_lower) lettre[0] = toupper(lettre[0]);
+	if(byreference && view->inverted_colors && (!on_off) && seq >= 2) {
+		if(toupper(lettre[0]) == toupper(view->sequence[0][site-1])) lettre[0] = '.';
+		}
 	}
 if(view->numb_gc == 1) { /* cas noir et blanc */
 	if(on_off) {
@@ -960,7 +967,10 @@
 char *lastpos, *pos;
 list_segments *segment, *first_segment;
 int save_col0;
-static char up_line[1000]; char *p, *q; int i;
+static char up_line[1000]; char *p, *q, *r; int i;
+Fl_Menu_Button *menu_props = (Fl_Menu_Button *)view->bouton_props;
+props_menu_parts *props_parts = (props_menu_parts *)menu_props->user_data();
+int byreference = ((Fl_Menu_Item *)menu_props->menu() + props_parts->reference)->value();
 
 if(view->tot_seqs == 0) {
 	return;
@@ -1019,12 +1029,20 @@
 			view->line_height);
 		}
 	if(l_line == 0) continue;
+	
 /*ecriture des seqs: regions en noir et autres en col2 */
 	fl_color( use_region ? ob->selection_color() : FL_BLACK );
 	p = view->sequence[nline] + offset; 
-	if(!view->allow_lower) {
+	memcpy(up_line, p, l_line); up_line[l_line] = 0;
+	p = up_line;
+	if(!view->allow_lower) majuscules(up_line);
+	if(byreference && nline != 0) {
 		q = p + l_line; i = 0;
-		while( p < q) up_line[i++] = toupper(*(p++));
+		r= view->sequence[0] + offset; 
+		while( p < q) {
+			up_line[i++] = (toupper(*p) == toupper(*r) ? '.' : *p);
+			p++; r++;
+			}
 		p = up_line;
 		}
 	fl_draw(p, l_line, x, y);
@@ -1036,9 +1054,7 @@
 			if(segment->debut > der_site) break;
 			debut = FL_max(segment->debut, view->first_site);
 			fin = FL_min(segment->fin, der_site);
-			if(view->allow_lower) 
-				p = view->sequence[nline] + debut - 1;
-			else p = up_line + debut - offset - 1;
+			p = up_line + debut - offset - 1;
 			fl_draw(p,
 				fin - debut + 1, 
 				x + (debut - offset - 1)*view->char_width, y);
@@ -2590,11 +2606,7 @@
 
 int ask_with_custom_yesno(const char *text, const char *yes, const char *no)
 {
-const char *oldyes = fl_yes; const char *oldno = fl_no;
-fl_yes = yes; fl_no = no;
-int rep = fl_ask(text);
-fl_yes = oldyes; fl_no = oldno;
-return rep;
+return fl_choice(text, no, yes, NULL);
 }
 
 
@@ -3053,8 +3065,7 @@
 Fl_Menu_Button *menu_props = (Fl_Menu_Button *)view->bouton_props;
 props_menu_parts *props_parts = (props_menu_parts *)menu_props->user_data();
 if(on) { /* tenter de passer en mode par reference */
-	if(view ->inverted_colors || view->tot_sel_seqs != 1 || 
-			view->numb_gc == 1) {
+	if( view->tot_sel_seqs != 1 || view->numb_gc == 1) {
 		((Fl_Menu_Item *)menu_props->menu() + props_parts->reference)->clear();
 		return;
 		}
@@ -3062,6 +3073,7 @@
 	for(old_pos = 0; old_pos < view->tot_seqs; old_pos++)
 		if(view->sel_seqs[old_pos]) break;
 	deplacer_grp_seqs(view, 1);
+	view->modif_but_not_saved = FALSE;
 	view->first_seq = 1;
 	view->vertsli->Fl_Slider::value(1);
 	view->alt_col_seq = prepcolseqs_by_difference(view->sequence, 
@@ -3096,6 +3108,7 @@
 		view->numb_gc);
 	view->alt_col_seq = NULL;
 	deplacer_grp_seqs(view, old_pos + 1);
+	view->modif_but_not_saved = FALSE;
 	view->DNA_obj->redraw();
 	((Fl_Menu_Item *)menu_props->menu() + props_parts->colors - 1)->activate();
 	((Fl_Menu_Item *)menu_props->menu() + props_parts->reference)->clear();
@@ -3272,7 +3285,7 @@
 props_menu_parts *props_parts = (props_menu_parts *)menu_props->user_data();
 	Fl_Menu_Item *byref = (Fl_Menu_Item *)menu_props->menu() + props_parts->reference;
 	if(view->tot_sel_seqs == 1) {
-		if(!view->inverted_colors) byref->activate();
+		byref->activate();
 		items[RENAME_SEQ].activate();
 		items[DUPLICATE_SEQ].activate();
 		items[EDIT_COMMENTS].activate();

Modified: trunk/packages/seaview/branches/upstream/current/seaview.h
===================================================================
--- trunk/packages/seaview/branches/upstream/current/seaview.h	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/seaview.h	2006-10-28 09:24:54 UTC (rev 151)
@@ -295,6 +295,7 @@
 extern int insert_gap_all_comments(int numgaps, int pos,  SEA_VIEW *view);
 extern int delete_in_all_comments(int numdels, int pos,  SEA_VIEW *view);
 extern char* fl_file_chooser(const char* message, const char* pat, const char* fname);
+extern int ask_with_custom_yesno(const char *text, const char *yes, const char *no);
 #ifdef __APPLE__
 extern char *mac_fname_to_roman(char *in); 
 #endif

Modified: trunk/packages/seaview/branches/upstream/current/seaview.help
===================================================================
--- trunk/packages/seaview/branches/upstream/current/seaview.help	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/seaview.help	2006-10-28 09:24:54 UTC (rev 151)
@@ -137,8 +137,7 @@
 
 by Reference To display the alignment by reference to a particular sequence:
              residues identical to that of the ref. seq. are displayed as dots.
-             Possible only when one sequence, the reference, is selected and
-             if not in inverted color mode.
+             Possible only when one sequence, the reference, is selected.
              Alignment edition is impossible while in the reference mode.
              When used, File:Prepare pdf produces an output by reference.
              Combination ctrl/cmd+R is a shortcut for calling/exiting this mode.

Added: trunk/packages/seaview/branches/upstream/current/seaview.xcf
===================================================================
(Binary files differ)


Property changes on: trunk/packages/seaview/branches/upstream/current/seaview.xcf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/packages/seaview/branches/upstream/current/seaview.xpm
===================================================================
--- trunk/packages/seaview/branches/upstream/current/seaview.xpm	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/seaview.xpm	2006-10-28 09:24:54 UTC (rev 151)
@@ -0,0 +1,131 @@
+/* XPM */
+static char * seaview_xpm[] = {
+"32 32 95 2",
+"  	c None",
+". 	c #19CC19",
+"+ 	c #CC4DCC",
+"@ 	c #129812",
+"# 	c #063806",
+"$ 	c #010D01",
+"% 	c #000300",
+"& 	c #031803",
+"* 	c #094C09",
+"= 	c #139C13",
+"- 	c #000000",
+"; 	c #118B11",
+"> 	c #000100",
+", 	c #042204",
+"' 	c #073D07",
+") 	c #14AB14",
+"! 	c #18C818",
+"~ 	c #16BB16",
+"{ 	c #108710",
+"] 	c #063206",
+"^ 	c #000400",
+"/ 	c #17BD17",
+"( 	c #031903",
+"_ 	c #0C680C",
+": 	c #17BC17",
+"< 	c #0F7E0F",
+"[ 	c #031C03",
+"} 	c #084408",
+"| 	c #0F800F",
+"1 	c #010901",
+"2 	c #042404",
+"3 	c #16B916",
+"4 	c #18C918",
+"5 	c #14AA14",
+"6 	c #0F7A0F",
+"7 	c #084808",
+"8 	c #15B015",
+"9 	c #010E01",
+"0 	c #052B05",
+"a 	c #0E770E",
+"b 	c #15AC15",
+"c 	c #18C618",
+"d 	c #18C718",
+"e 	c #14A414",
+"f 	c #042304",
+"g 	c #000200",
+"h 	c #118C11",
+"i 	c #0B5A0B",
+"j 	c #000700",
+"k 	c #021502",
+"l 	c #084308",
+"m 	c #139D13",
+"n 	c #1980E6",
+"o 	c #FFFFFF",
+"p 	c #187CDF",
+"q 	c #010911",
+"r 	c #105293",
+"s 	c #105294",
+"t 	c #051E36",
+"u 	c #051E37",
+"v 	c #146AC0",
+"w 	c #051C33",
+"x 	c #051A2E",
+"y 	c #146BC1",
+"z 	c #0A3763",
+"A 	c #0F4D8B",
+"B 	c #0F4F8E",
+"C 	c #0A3764",
+"D 	c #187BDD",
+"E 	c #01080E",
+"F 	c #000509",
+"G 	c #1779DA",
+"H 	c #01080F",
+"I 	c #0F4F8F",
+"J 	c #092F54",
+"K 	c #0B3865",
+"L 	c #0F5090",
+"M 	c #051B31",
+"N 	c #125FAC",
+"O 	c #156CC3",
+"P 	c #051C32",
+"Q 	c #1468BB",
+"R 	c #1468BC",
+"S 	c #0A345E",
+"T 	c #0A355F",
+"U 	c #1779DB",
+"V 	c #01070C",
+"W 	c #000101",
+"X 	c #1671CB",
+"Y 	c #177ADC",
+"Z 	c #0F4D8A",
+"` 	c #072440",
+" .	c #062340",
+"..	c #05192E",
+"+.	c #105599",
+". . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + ",
+". . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + ",
+". . . . . @ # $ % & * = . . . . + + + + - - - - - - - - + + + + ",
+". . . . ; > - - - - - - . . . . + + + + - - - - - - - - + + + + ",
+". . . . , - ' ) ! ~ { ] . . . . + + + + - - + + + + + + + + + + ",
+". . . . ^ - / . . . . . . . . . + + + + - - + + + + + + + + + + ",
+". . . . ( - _ : . . . . . . . . + + + + - - + + + + + + + + + + ",
+". . . . < - - - [ } | ! . . . . + + + + - - - - - - - - + + + + ",
+". . . . . @ ' 1 - - - 2 3 . . . + + + + - - - - - - - - + + + + ",
+". . . . . . . 4 5 6 [ - 7 . . . + + + + - - + + + + + + + + + + ",
+". . . . . . . . . . 8 - 9 . . . + + + + - - + + + + + + + + + + ",
+". . . . . . . . . . : - ^ . . . + + + + - - + + + + + + + + + + ",
+". . . . 0 a b c d e # - f . . . + + + + - - + + + + + + + + + + ",
+". . . . - - - - - - - g h . . . + + + + - - - - - - - - + + + + ",
+". . . . e i 2 j ^ k l m . . . . + + + + - - - - - - - - + + + + ",
+". . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + ",
+"n n n n n n n n n n n n n n n n o o o o o o o o o o o o o o o o ",
+"n n n n n n n n n n n n n n n n o o o o o o o o o o o o o o o o ",
+"n n n n n n p q q p n n n n n n o o o o o o o o o o o o o o o o ",
+"n n n n n n r - - s n n n n n n o o o o o o o o o o o o o o o o ",
+"n n n n n n t - - u n n n n n n o o o o o o o o o o o o o o o o ",
+"n n n n n v - w x - y n n n n n o o o o o o o o o o o o o o o o ",
+"n n n n n z - A B - C n n n n n o o o o o o o o o o o o o o o o ",
+"n n n n D E F G D H H D n n n n o o o o o o - - - - - o o o o o ",
+"n n n n I - J n n K - L n n n n o o o o o o - - - - - o o o o o ",
+"n n n n M - N n n O - P n n n n o o o o o o o o o o o o o o o o ",
+"n n n Q - - - - - - - - R n n n o o o o o o o o o o o o o o o o ",
+"n n n S - - - - - - - - T n n n o o o o o o o o o o o o o o o o ",
+"n n U V W X n n n n X W V Y n n o o o o o o o o o o o o o o o o ",
+"n n Z - ` n n n n n n  .- A n n o o o o o o o o o o o o o o o o ",
+"n n ..- +.n n n n n n +.- ..n n o o o o o o o o o o o o o o o o ",
+"n n n n n n n n n n n n n n n n o o o o o o o o o o o o o o o o "};
+
\ No newline at end of file

Modified: trunk/packages/seaview/branches/upstream/current/xfmatpt.cxx
===================================================================
--- trunk/packages/seaview/branches/upstream/current/xfmatpt.cxx	2006-10-28 09:10:18 UTC (rev 150)
+++ trunk/packages/seaview/branches/upstream/current/xfmatpt.cxx	2006-10-28 09:24:54 UTC (rev 151)
@@ -844,8 +844,8 @@
 {
 int rep;
 if(matpt->modif_but_not_saved) {
-	rep = fl_ask("Changes in dot plot were not saved in alignment\n"
-		"Do you really want to close the dot plot?");
+	rep = ask_with_custom_yesno("Changes in dot plot were not saved in alignment\n"
+		"Do you really want to close the dot plot?", "Close", "Cancel");
 	if(!rep) return FALSE;
 	}
 free(matpt->seq1 + 1);




More information about the debian-med-commit mailing list