[PD-cvs] pd/src g_editor.c,1.1.1.4.2.3.2.16,1.1.1.4.2.3.2.17 u_main.tk,1.1.1.4.2.7.4.45,1.1.1.4.2.7.4.46 u_object.tk,1.1.2.19,1.1.2.20

Mathieu Bouchard matju at users.sourceforge.net
Mon Apr 26 10:45:15 CEST 2004


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20418

Modified Files:
      Tag: impd_0_37
	g_editor.c u_main.tk u_object.tk 
Log Message:
bug fixes


Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.1.1.4.2.3.2.16
retrieving revision 1.1.1.4.2.3.2.17
diff -C2 -d -r1.1.1.4.2.3.2.16 -r1.1.1.4.2.3.2.17
*** g_editor.c	21 Apr 2004 03:02:41 -0000	1.1.1.4.2.3.2.16
--- g_editor.c	26 Apr 2004 08:45:12 -0000	1.1.1.4.2.3.2.17
***************
*** 25,29 ****
  	for (i=0; i<ac; i++) {
  		atom_string(av+i,buf+n,sizeof(buf)-1-n);
! 		sprintf(buf+n,", ");
  	}
  	post("%s",buf);
--- 25,29 ----
  	for (i=0; i<ac; i++) {
  		atom_string(av+i,buf+n,sizeof(buf)-1-n);
! 		if (i!=ac-1) sprintf(buf+n,", ");
  	}
  	post("%s",buf);
***************
*** 675,687 ****
  
  
! void canvas_inlettip(t_canvas* x,t_object* ob,int closest,int xpos,int ypos)
  {
      int inlet=closest;
      char *text;
      if (!sys_tooltips) return;
      if (ob->ob_pd->c_firstin) closest--;
      text = closest < 0 ? ob->ob_pd->c_firsttip->s_name : inlet_tip(ob->te_inlet,closest);
      sys_vgui("show_canvas_tooltip %x .x%x.c %d %d \"%d: %s\"\n",
! 	     ob, x, xpos, ypos-20,inlet,text);
  }
  
--- 675,690 ----
  
  
! void canvas_inlettip(t_canvas* can,t_symbol *o,t_float closest,t_float x,t_float y)
  {
      int inlet=closest;
+     int xpos=x, ypos=y;
      char *text;
+     t_object *ob;
+     sscanf(o->s_name,"x%x",(int*)&ob);
      if (!sys_tooltips) return;
      if (ob->ob_pd->c_firstin) closest--;
      text = closest < 0 ? ob->ob_pd->c_firsttip->s_name : inlet_tip(ob->te_inlet,closest);
      sys_vgui("show_canvas_tooltip %x .x%x.c %d %d \"%d: %s\"\n",
! 	     ob, can, xpos, ypos-20,inlet,text);
  }
  
***************
*** 1021,1025 ****
      	    else if (ob && (ninlet = obj_ninlets(ob)) && ypos <= y1+4)
      	    {
!     	    	int width = x2-x1;
      	    	int nin1 = ninlet>1 ? ninlet-1 : 1;
      	    	int closest = ((xpos-x1) * nin1 + width/2)/width;
--- 1024,1028 ----
      	    else if (ob && (ninlet = obj_ninlets(ob)) && ypos <= y1+4)
      	    {
! /*    	    	int width = x2-x1;
      	    	int nin1 = ninlet>1 ? ninlet-1 : 1;
      	    	int closest = ((xpos-x1) * nin1 + width/2)/width;
***************
*** 1027,1030 ****
--- 1030,1034 ----
  		if (closest < ninlet && xpos >= hotspot-1 && xpos <= hotspot + IOWIDTH+1)
  			canvas_inlettip(x,ob,closest,xpos,ypos);
+ */
      	    }
  	    /* not in an outlet; select and move */
***************
*** 1034,1039 ****
  		    /* check if the box is being text edited */
  	    nooutletafterall:
! 		if (ob && (rt = e->e_textedfor) &&
! 		    rt == glist_findrtext(x, ob))
      	    	{
  		    rtext_mouse(rt, xpos - x1, ypos - y1, RTEXT_DOWN);
--- 1038,1042 ----
  		    /* check if the box is being text edited */
  	    nooutletafterall:
! 		if (ob && (rt = e->e_textedfor) && rt == glist_findrtext(x, ob))
      	    	{
  		    rtext_mouse(rt, xpos - x1, ypos - y1, RTEXT_DOWN);
***************
*** 1095,1119 ****
  
  void canvas_add_wire(t_canvas *x, t_symbol *s, int ac, t_atom *av) {
! 	if (ac==4 && av[0].a_type == A_SYMBOL && av[1].a_type == A_FLOAT
! 	          && av[2].a_type == A_SYMBOL && av[3].a_type == A_FLOAT) {
! 		t_object *obj1, *obj2;
! 		int port1, port2;
! 		t_symbol *obj1s, *obj2s;
! 		t_outconnect *oc;
! 		obj1s = atom_getsymbol(av+0); sscanf(obj1s->s_name,"%x",&obj1); port1 = atom_getint(av+1);
! 		obj2s = atom_getsymbol(av+2); sscanf(obj2s->s_name,"%x",&obj2); port2 = atom_getint(av+3);
! /*		post("canvas_add_wire: .x%x.c %x %d %x %d",x,obj1,port1,obj2,port2); */
!     	    	oc = obj_connect(obj1, port1, obj2, port2);
! 		sys_vgui("wire_update l%x {%x %d %x %d %d}\n", oc, obj1,port1,obj2,port2,
! 		    obj_issignaloutlet(obj1,port1));
! 		sys_vgui("wire_draw2 l%x .x%x.c\n", oc, glist_getcanvas(x));
! 		canvas_setundo(x, canvas_undo_connect,
! 		    canvas_undo_set_connect(x, 
! 		    	canvas_getindex(x, &obj1->ob_g), port1,
! 			canvas_getindex(x, &obj2->ob_g), port2),
! 		    	"connect");
! 	} else {
! 		post("BORK at %s:%d",__FILE__,__LINE__);
! 	}
  }
  
--- 1098,1124 ----
  
  void canvas_add_wire(t_canvas *x, t_symbol *s, int ac, t_atom *av) {
! 	t_object *obj1, *obj2;
! 	int port1, port2;
! 	t_symbol *obj1s, *obj2s;
! 	t_outconnect *oc;
! 	if (!(ac==4 && av[0].a_type == A_SYMBOL && av[1].a_type == A_FLOAT
! 	          && av[2].a_type == A_SYMBOL && av[3].a_type == A_FLOAT)) goto bork;
! 	obj1s = atom_getsymbol(av+0); sscanf(obj1s->s_name,"x%x",&obj1); port1 = atom_getint(av+1);
! 	obj2s = atom_getsymbol(av+2); sscanf(obj2s->s_name,"x%x",&obj2); port2 = atom_getint(av+3);
! 	if (port1>50 || port1<0) goto bork;
! 	if (port2>50 || port2<0) goto bork;
! 	oc = obj_connect(obj1, port1, obj2, port2);
! 	sys_vgui("wire_update l%x {%x %d %x %d %d}\n", oc, obj1,port1,obj2,port2,
! 	obj_issignaloutlet(obj1,port1));
! 	sys_vgui("wire_draw2 l%x .x%x.c\n", oc, glist_getcanvas(x));
! 	canvas_setundo(x, canvas_undo_connect,
! 	    canvas_undo_set_connect(x, 
! 	    	canvas_getindex(x, &obj1->ob_g), port1,
! 		canvas_getindex(x, &obj2->ob_g), port2),
! 	    	"connect");
! 	return;
! bork:
! 	post_atoms("canvas_add_wire: ",ac,av);
! 	post("BORK at %s:%d",__FILE__,__LINE__);
  }
  
***************
*** 1977,1980 ****
--- 1982,1986 ----
      class_addmethod(c, (t_method)canvas_motion, gensym("motion"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
      class_addmethod(c, (t_method)canvas_add_wire, gensym("add-wire"), A_GIMME, A_NULL);
+     class_addmethod(c, (t_method)canvas_inlettip, gensym("inlet-tip"), A_SYMBOL, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
  /* ------------------------ menu actions ---------------------------- */
      class_addmethod(c, (t_method)canvas_menuclose, gensym("menuclose"), A_DEFFLOAT, 0);

Index: u_object.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/u_object.tk,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -C2 -d -r1.1.2.19 -r1.1.2.20
*** u_object.tk	17 Apr 2004 04:39:01 -0000	1.1.2.19
--- u_object.tk	26 Apr 2004 08:45:12 -0000	1.1.2.20
***************
*** 94,98 ****
  	global look
  	set xys [list $x1 $y1 $x2 $y2]
! #	set length [expr sqrt(pow($x2-$x1,2)+pow($y2-$y1,2))]
  #	set step [expr 1/floor(1+$length/4)]
  #	for {set i 0} {$i<=1.001} {set i [expr $i+$step]} {
--- 94,98 ----
  	global look
  	set xys [list $x1 $y1 $x2 $y2]
! 	set length [expr sqrt(pow($x2-$x1,2)+pow($y2-$y1,2))]
  #	set step [expr 1/floor(1+$length/4)]
  #	for {set i 0} {$i<=1.001} {set i [expr $i+$step]} {
***************
*** 106,114 ****
  #	}
  
  	if {[llength [$canvas gettags $self]] != 0} {
  		$canvas coords $self $xys
  	} {
  		$canvas create line $xys -tags $self -width $thick \
! 			-arrow last -fill $look(wirefg)
  #			-smooth yes
  	}
--- 106,119 ----
  #	}
  
+ 	set arrowsize [expr $length<100 ? $length/10 : 10]
+ 	if {$arrowsize < 5} {set arrow none} {set arrow last}
+ 	set arrowshape [list $arrowsize [expr $arrowsize*4/5] [expr $arrowsize/3]]
+ 
  	if {[llength [$canvas gettags $self]] != 0} {
  		$canvas coords $self $xys
+ 		$canvas itemconfigure -arrow $arrow -arrowshape $arrowshape
  	} {
  		$canvas create line $xys -tags $self -width $thick \
! 			-arrow $arrow -arrowshape $arrowshape -fill $look(wirefg)
  #			-smooth yes
  	}
***************
*** 127,131 ****
  
  proc wire_select {self canvas flag} {
! 	if {$flag} {set colour #0000ff} {set colour #8888cc}
  	$canvas itemconfigure $self -fill $colour
  }
--- 132,137 ----
  
  proc wire_select {self canvas flag} {
! 	global _ look
! 	if {$flag} {set colour #ff8000} {set colour $look(wirefg)}
  	$canvas itemconfigure $self -fill $colour
  }
***************
*** 776,780 ****
  	global _ vu_col
  	foreach {x1 y1} [object_xy $self $canvas] {}
- 	set y1 $_($self:y1)
  	set xs $_($self:w)
  	set ys $_($self:h)
--- 782,785 ----
***************
*** 783,786 ****
--- 788,792 ----
  	set c [lindex $vu_col $i]
  	#puts "i=$i c=$c"
+ 	if {!$i} {return}
  	set y1 [expr $y1 + ($led_size+1)*(41-$i) - ($led_size+1)/2]
  	$canvas create rectangle $x1 $y1 [expr $x1+$xs] [expr $y1+$led_size] \

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.1.1.4.2.7.4.45
retrieving revision 1.1.1.4.2.7.4.46
diff -C2 -d -r1.1.1.4.2.7.4.45 -r1.1.1.4.2.7.4.46
*** u_main.tk	20 Apr 2004 01:20:44 -0000	1.1.1.4.2.7.4.45
--- u_main.tk	26 Apr 2004 08:45:12 -0000	1.1.1.4.2.7.4.46
***************
*** 769,774 ****
      	bind $name.c <Button-5> "$name.c yview scroll +1 units"
      }}
!     catch {image create photo mybackground -file "test2.gif"}
!     catch {$name.c create image -6 -39 -anchor nw -image mybackground -tag bg}
      #scale $name.bbar.bg -orient horizontal -showvalue false -from 0 -to 255 -command {}
      #pack $name.bbar.bg -side right
--- 769,774 ----
      	bind $name.c <Button-5> "$name.c yview scroll +1 units"
      }}
!     #catch {image create photo mybackground -file "test2.gif"}
!     #catch {$name.c create image -6 -39 -anchor nw -image mybackground -tag bg}
      #scale $name.bbar.bg -orient horizontal -showvalue false -from 0 -to 255 -command {}
      #pack $name.bbar.bg -side right
***************
*** 831,835 ****
      set cy [$canvas canvasy $y]
      set edit 0; switch $_($self:mode) { edit { set edit 1 } }
!     foreach {type id} [identify_target $canvas $x $y $b $f "click"] {}
      switch $type {
        object {
--- 831,835 ----
      set cy [$canvas canvasy $y]
      set edit 0; switch $_($self:mode) { edit { set edit 1 } }
!     foreach {type id} [identify_target $canvas $cx $cy $b $f "click"] {}
      switch $type {
        object {
***************
*** 837,841 ****
  	pd "$self click-on-object x$id $cx $cy $b $f;"
  	if {$edit && [llength [$canvas bbox ${id}BASE]]} {
- 	    set wire_from [list $cx $cy]
  	    foreach {x1 y1 x2 y2} [$canvas bbox ${id}BASE] {}
  	    if {abs($y2-3-$cy)<=3} {
--- 837,840 ----
***************
*** 882,897 ****
      set current_x $cx
      set current_y $cy
      foreach {type id} [identify_target $canvas $x $y -1 -1 "move "] {}
      switch $type {
        object {
  	if {$edit && [llength [$canvas bbox ${id}BASE]]} {
! 	  if {[llength $wire_from]} {
! 	    # may highlight an inlet
! 	    foreach {x1 y1 x2 y2} [$canvas bbox ${id}BASE] {}
! 	    if {abs($y1+3-$cy)<=3} {
! 	        set ports 0
! 		catch {set ports $_($id:inlets)}
! 		if {$ports==0} return
! 		set port [expr int(($cx-$x1)*$ports/($x2-$x1))]
  		$canvas create rectangle \
  			[l+ [$canvas coords ${id}i${port}] {-4 -4 +4 +4}] \
--- 881,909 ----
      set current_x $cx
      set current_y $cy
+     if {[llength [$canvas gettags lnew]]} {
+ 	#foreach {ox1 oy1 ox2 oy2} [$canvas coords lnew] {}
+ 	#$canvas coords lnew $ox1 $oy1 $cx $cy
+ 	foreach {ox1 oy1 ox2 oy2} [lrange [$canvas coords lnew] end-3 end] {}
+ 	set l [$canvas coords lnew]
+ 	if {[llength $l]<4 || pow($ox1-$cx,2)+pow($oy1-$cy,2)<pow(30,2)} {
+ 		set l [lrange $l 0 [expr [llength $l]-3]]
+ 	}
+ 	lappend l $cx $cy
+ 	$canvas coords lnew $l
+ 	#$canvas coords lnew [lindex $l 0] [lindex $l 1] [lindex $l end-1] [lindex $l end]
+ 	#return
+     }
      foreach {type id} [identify_target $canvas $x $y -1 -1 "move "] {}
      switch $type {
        object {
  	if {$edit && [llength [$canvas bbox ${id}BASE]]} {
! 	  # may highlight an inlet
! 	  foreach {x1 y1 x2 y2} [$canvas bbox ${id}BASE] {}
! 	  if {abs($y1+3-$cy)<=3} {
! 	    set ports 0
! 	    catch {set ports $_($id:inlets)}
! 	    if {$ports==0} return
! 	    set port [expr int(($cx-$x1)*$ports/($x2-$x1))]
! 	    if {[llength $wire_from]} {
  		$canvas create rectangle \
  			[l+ [$canvas coords ${id}i${port}] {-4 -4 +4 +4}] \
***************
*** 900,903 ****
--- 912,918 ----
  		set wire_to [list $id $port]
  		return
+ 	    } {
+ 		pd "$self inlet-tip x${id} $port $cx $cy ;"
+ 		return
  	    }
  	  } {
***************
*** 922,939 ****
        wire {}
      }
!     if {[llength [$canvas gettags lnew]]} {
! 	#foreach {ox1 oy1 ox2 oy2} [$canvas coords lnew] {}
! 	#$canvas coords lnew $ox1 $oy1 $cx $cy
! 	foreach {ox1 oy1 ox2 oy2} [lrange [$canvas coords lnew] end-3 end] {}
! 	set l [$canvas coords lnew]
! 	if {[llength $l]<4 || pow($ox1-$cx,2)+pow($oy1-$cy,2)<pow(30,2)} {
! 		set l [lrange $l 0 [expr [llength $l]-3]]
! 	}
! 	lappend l $cx $cy
! 	$canvas coords lnew $l
! 	#$canvas coords lnew [lindex $l 0] [lindex $l 1] [lindex $l end-1] [lindex $l end]
! 	return
!     }
!     pd "[canvastosym $canvas] motion $x $y $mods ;"
  }
  
--- 937,941 ----
        wire {}
      }
!     pd "[canvastosym $canvas] motion $cx $cy $mods ;"
  }
  
***************
*** 949,956 ****
  proc pdtk_canvas_mouseup {name x y b} {
      global pdtk_canvas_mouseup wire_from wire_to
      set self [canvastosym $name]
      if {[llength $wire_from]} {
          if {[llength $wire_to]} {
! 		pd "$self add-wire $wire_from $wire_to ;"
  	}
  	set wire_from {}
--- 951,961 ----
  proc pdtk_canvas_mouseup {name x y b} {
      global pdtk_canvas_mouseup wire_from wire_to
+     set cx [$name canvasx $x]
+     set cy [$name canvasy $y]
      set self [canvastosym $name]
      if {[llength $wire_from]} {
          if {[llength $wire_to]} {
! 		puts stderr "$self add-wire x$wire_from x$wire_to ;"
! 		pd "$self add-wire x$wire_from x$wire_to ;"
  	}
  	set wire_from {}
***************
*** 959,963 ****
  	#return
      }
!     pd "$self mouseup [$name canvasx $x] [$name canvasy $y] $b ;"
  
      set size [$name bbox all]
--- 964,968 ----
  	#return
      }
!     pd "$self mouseup $cx $cy $b ;"
  
      set size [$name bbox all]
***************
*** 1077,1131 ****
  }
  
- ############ pdtk_canvas_dofont -- run a font and resize dialog #########
- 
- set fontsize 0
- set stretchval 0
- set whichstretch 0
- 
- proc dofont_apply {name} {
-     global _
-     pd "$name font $_($name:fontsize) $_($name:stretchval) $_($name:whichstretch) ;"
- }
- 
- proc dofont_cancel {name} {
-     pd "$name cancel ;"
- }
- 
- proc pdtk_canvas_dofont {name initsize} {
-     global fontsize;     set fontsize $initsize
-     global stretchval;   set stretchval 100
-     global whichstretch; set whichstretch 1
-     
-     toplevel $name
-     wm title $name "FONT BOMB"
-     wm protocol $name WM_DELETE_WINDOW "dofont_cancel $name"
- 
-     frame $name.buttonframe
-     pack $name.buttonframe -side bottom -fill x -pady 2m
-     button $name.buttonframe.cancel -text "Cancel" -command "dofont_cancel $name"; pack $name.buttonframe.cancel -side left -expand 1
-     button $name.buttonframe.ok     -text "Do it"  -command  "dofont_apply $name"; pack $name.buttonframe.ok     -side left -expand 1
-     frame $name.radiof
-     pack $name.radiof -side left
-     
-     label $name.radiof.label -text "Font Size: "
-     pack $name.radiof.label -side top
- 
-     foreach size {8 10 12 16 24 36} {
- 	radiobutton $name.radiof.radio$size -value $size -variable fontsize -text $size
- 	pack $name.radiof.radio$size -side top -anchor w
-     }
-     frame $name.stretchf
-     pack $name.stretchf -side left
-     label $name.stretchf.label -text "Stretch: "
-     pack $name.stretchf.label -side top
-     entry $name.stretchf.entry -textvariable stretchval -width 5
-     pack $name.stretchf.entry -side left
-     foreach {i label} {1 "X and Y" 2 "X only" 3 "Y only"} {
- 	radiobutton $name.stretchf.radio$i -value $i \
- 		-variable $_($name:whichstretch) -text $label
- 	pack $name.stretchf.radio$i -side top -anchor w
-     }
- }
- 
  ############ properties_dialog #########
  
--- 1082,1085 ----
***************
*** 1202,1210 ****
  	    choice {
  		set i 0
! 		foreach part $label {
! 			radiobutton $f$i -text $part -value $i -variable _($self:$name)
! 			pack $f$i -side top
  			incr i
  		}
  	    }
  	    toggle {
--- 1156,1168 ----
  	    choice {
  		set i 0
! 		frame $f
! 		label $f.label -text [lindex $label 0]
! 		pack $f.label $f -side left
! 		foreach part [lrange $label 1 end] {
! 			radiobutton $f.$i -text $part -value $i -variable _($self:$name)
! 			pack $f.$i -side top
  			incr i
  		}
+ 		pack $f -side top
  	    }
  	    toggle {
***************
*** 1229,1232 ****
--- 1187,1232 ----
  }
  
+ ############ pdtk_canvas_dofont -- run a font and resize dialog #########
+ 
+ set fontsize 0
+ set stretchval 0
+ set whichstretch 0
+ 
+ proc dofont_apply {name} {
+     global _
+     set self [string trimleft $name .]
+     pd "$name font \
+ 	[lindex {8 10 12 16 24 36} $_($self:fontsize)] \
+ 	$_($self:stretchval) [expr 1+$_($self:whichstretch)] ;"
+ }
+ 
+ proc dofont_cancel {name} { pd "$name cancel ;" }
+ 
+ proc pdtk_canvas_dofont {name initsize} {
+     global _
+     set self [string trimleft $name .]
+     set _($self:fontsize) [lsearch {8 10 12 16 24 36} $initsize]
+     set _($self:stretchval) 100
+     set _($self:whichstretch) 0
+ 
+     toplevel $name
+     wm title $name "FONT BOMB"
+     wm protocol $name WM_DELETE_WINDOW "dofont_cancel $name"
+ 
+     frame $name.buttonframe
+     pack $name.buttonframe -side bottom -fill x -pady 2m
+     button $name.buttonframe.cancel -text "Cancel" -command "dofont_cancel $name"; pack $name.buttonframe.cancel -side left -expand 1
+     button $name.buttonframe.ok     -text "Do it"  -command  "dofont_apply $name"; pack $name.buttonframe.ok     -side left -expand 1
+     frame $name.radiof
+     pack $name.radiof -side left
+     
+     set props {
+ 	fontsize {"Font Size: " 8 10 12 16 24 36} choice {}
+ 	stretchval "Stretch: " entry {-width 5}
+ 	whichstretch {"Axes: " "X and Y" "X only" "Y only"} choice {}
+     }
+     properties_dialog $self .$self dofont_ok $props
+ }
+ 
  ############ pdtk_gatom_dialog -- run a gatom dialog #########
  
***************
*** 1286,1295 ****
      frame .$self.buttonsep -height 2 -borderwidth 1 -relief sunken
      frame .$self.buttonframe
!     button .$self.buttonframe.cancel -text "Cancel" -command "${procprefix}_cancel .$self"
!     button .$self.buttonframe.apply  -text "Apply"  -command "${procprefix}_apply .$self"
!     button .$self.buttonframe.ok     -text "OK"     -command "${procprefix}_ok .$self"
!     pack .$self.buttonframe.cancel -side left -expand 1
!     pack .$self.buttonframe.apply  -side left -expand 1
!     pack .$self.buttonframe.ok     -side left -expand 1
      pack .$self.buttonframe -side bottom -fill x -pady 2m
      pack .$self.buttonsep   -side bottom -fill x
--- 1286,1293 ----
      frame .$self.buttonsep -height 2 -borderwidth 1 -relief sunken
      frame .$self.buttonframe
!     foreach {a b} {cancel "Cancel" apply "Apply" ok "OK"} {
! 	button .$self.buttonframe.$a -text $b -command "${procprefix}_$a .$self"
! 	pack .$self.buttonframe.$a -side left -expand 1
!     }
      pack .$self.buttonframe -side bottom -fill x -pady 2m
      pack .$self.buttonsep   -side bottom -fill x
***************
*** 1395,1402 ****
  ############ pdtk_iemgui_dialog -- dialog window for iem guis #########
  
- set iemgui_define_min_flashhold 50
- set iemgui_define_min_flashbreak 10
- set iemgui_define_min_fontsize 4
- 
  proc iemgui_clip_dim {id} {
      global _
--- 1393,1396 ----
***************
*** 1416,1420 ****
      global _
      set self [string trimleft $id .]
-     global iemgui_define_min_flashhold iemgui_define_min_flashbreak
      if {$_($self:rng_sch) == 2} {
          if {$_($self:max_rng) < $_($self:min_rng)} {
--- 1410,1413 ----
***************
*** 1423,1432 ****
  	    set _($self:max_rng) $tmp
          }
!         if {$_($self:max_rng) < $iemgui_define_min_flashhold} {
! 	    set _($self:max_rng) $iemgui_define_min_flashhold
!         }
! 	if {$_($self:min_rng) < $iemgui_define_min_flashbreak} {
! 	    set _($self:min_rng) $iemgui_define_min_flashbreak
!         }
      }
      if {$_($self:rng_sch) == 1} {
--- 1416,1421 ----
  	    set _($self:max_rng) $tmp
          }
!         if {$_($self:max_rng) < 50} {set _($self:max_rng) 50}
! 	if {$_($self:min_rng) < 10} {set _($self:min_rng) 10}
      }
      if {$_($self:rng_sch) == 1} {
***************
*** 1453,1459 ****
      global _
      set self [string trimleft $id .]
!     global iemgui_define_min_fontsize
!     if {$_($self:fs) < $iemgui_define_min_fontsize} {
!         set _($self:fs) $iemgui_define_min_fontsize
      }
  }
--- 1442,1447 ----
      global _
      set self [string trimleft $id .]
!     if {$_($self:fs) < 4} {
!         set _($self:fs) 4
      }
  }
***************
*** 1547,1556 ****
      
      if {$_($self:lin0_log1) >= 0} {
! 	lappend props lin0_log1 [list $lilo0_label $lilo1_label] choice {}
      }
      if {$_($self:loadbang) >= 0} {lappend props loadbang "init" toggle {}}
      if {$_($self:num) > 0} {lappend props num $num_label entry {-width 4}}
      if {$_($self:steady) >= 0} {
! 	lappend props steady [list "jump on click" "steady on click"] choice {}
      }
      properties_dialog $self .$self iemgui_ok $props
--- 1535,1544 ----
      
      if {$_($self:lin0_log1) >= 0} {
! 	lappend props lin0_log1 [list "Mode: " $lilo0_label $lilo1_label] choice {}
      }
      if {$_($self:loadbang) >= 0} {lappend props loadbang "init" toggle {}}
      if {$_($self:num) > 0} {lappend props num $num_label entry {-width 4}}
      if {$_($self:steady) >= 0} {
! 	lappend props steady [list "Steadiness: " "jump on click" "steady on click"] choice {}
      }
      properties_dialog $self .$self iemgui_ok $props
***************
*** 1561,1569 ****
      lappend props ldx "label x offset: " entry {-width  5}
      lappend props ldy "label y offset: " entry {-width  5}
!     lappend props fstyle {"courier (typewriter)" "helvetica (sansserif)" "times (serif)"} choice {}
      lappend props fs "font size: " entry {-width 5}
!     lappend props bcol "background color" color {}
!     lappend props fcol "foreground color" color {}
!     lappend props lcol      "label color" color {}
      properties_dialog $self .$self iemgui_ok $props
      cancel_apply_ok $self iemgui
--- 1549,1557 ----
      lappend props ldx "label x offset: " entry {-width  5}
      lappend props ldy "label y offset: " entry {-width  5}
!     lappend props fstyle {"Typeface: " "courier (typewriter)" "helvetica (sansserif)" "times (serif)"} choice {}
      lappend props fs "font size: " entry {-width 5}
!     lappend props bcol "background color: " color {}
!     lappend props fcol "foreground color: " color {}
!     lappend props lcol      "label color: " color {}
      properties_dialog $self .$self iemgui_ok $props
      cancel_apply_ok $self iemgui
***************
*** 1954,1959 ****
      set outputs 1
      if {$longform && $multi > 1 && [llength $indevlist] > 1} {set outputs 2}
!     if {$longform && $multi > 1 && [llength $indevlist] > 1} {set outputs 3}
!     if {$longform && $multi > 1 && [llength $indevlist] > 2} {set outputs 4}
      if {$multi == 0} {
  	frame $id.out1f
--- 1942,1947 ----
      set outputs 1
      if {$longform && $multi > 1 && [llength $indevlist] > 1} {set outputs 2}
!     if {$longform && $multi > 1 && [llength $indevlist] > 2} {set outputs 3}
!     if {$longform && $multi > 1 && [llength $indevlist] > 3} {set outputs 4}
      if {$multi == 0} {
  	frame $id.out1f
***************
*** 2422,2426 ****
    void -noadc "suppress audio input"
    alias -noaudio|-nosound {list -nodac -noadc}
!   radio {-alsa -jack -mmio -portaudio|-pa|-asio -oss} {
      "use ALSA audio API"
      "use JACK audio API"
--- 2410,2416 ----
    void -noadc "suppress audio input"
    alias -noaudio|-nosound {list -nodac -noadc}
!   radio {"" -alsa -jack -mmio -portaudio|-pa|-asio -oss} {
!     "Sound API: "
!     "default"
      "use ALSA audio API"
      "use JACK audio API"





More information about the Pd-cvs mailing list