[PD-cvs] pd/src u_main.tk,1.1.1.4.2.7.4.29,1.1.1.4.2.7.4.30 u_object.tk,1.1.2.13,1.1.2.14 g_array.c,1.1.1.3.2.2.2.2,1.1.1.3.2.2.2.3 g_canvas.c,1.1.1.4.2.7.2.8,1.1.1.4.2.7.2.9 g_editor.c,1.1.1.4.2.3.2.7,1.1.1.4.2.3.2.8 g_graph.c,1.1.1.3.2.3.2.5,1.1.1.3.2.3.2.6 g_io.c,1.1.1.1.16.2.2.2,1.1.1.1.16.2.2.3 g_rtext.c,1.1.1.2.2.6.2.5,1.1.1.2.2.6.2.6 g_scalar.c,1.1.1.2.2.2,1.1.1.2.2.2.2.1 g_template.c,1.1.1.3.2.2,1.1.1.3.2.2.2.1 g_text.c,1.1.1.4.2.2.2.6,1.1.1.4.2.2.2.7 g_traversal.c,1.1.1.1,1.1.1.1.18.1

Mathieu Bouchard matju at users.sourceforge.net
Fri Apr 2 01:22:04 CEST 2004


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

Modified Files:
      Tag: impd_0_37
	u_main.tk u_object.tk g_array.c g_canvas.c g_editor.c 
	g_graph.c g_io.c g_rtext.c g_scalar.c g_template.c g_text.c 
	g_traversal.c 
Log Message:
removing a few bugs and warnings


Index: g_traversal.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_traversal.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.18.1
diff -C2 -d -r1.1.1.1 -r1.1.1.1.18.1
*** g_traversal.c	29 Jul 2002 17:05:58 -0000	1.1.1.1
--- g_traversal.c	1 Apr 2004 23:22:02 -0000	1.1.1.1.18.1
***************
*** 286,293 ****
  static void ptrobj_sendwindow(t_ptrobj *x, t_symbol *s, int argc, t_atom *argv)
  {
-     t_scalar *sc;
-     t_symbol *templatesym;
-     int n;
-     t_typedout *to;
      t_glist *glist;
      t_pd *canvas;
--- 286,289 ----
***************
*** 668,672 ****
  static void getsize_pointer(t_getsize *x, t_gpointer *gp)
  {
!     int nitems, onset, type;
      t_symbol *templatesym = x->x_templatesym, *fieldsym = x->x_fieldsym,
      	*elemtemplatesym;
--- 664,668 ----
  static void getsize_pointer(t_getsize *x, t_gpointer *gp)
  {
!     int onset, type;
      t_symbol *templatesym = x->x_templatesym, *fieldsym = x->x_fieldsym,
      	*elemtemplatesym;
***************
*** 674,678 ****
      t_word *w;
      t_array *array;
-     int elemsize;
      t_gstub *gs = gp->gp_stub;
      if (!template)
--- 670,673 ----
***************
*** 749,753 ****
      t_template *elemtemplate;
      t_word *w;
-     t_atom at;
      t_array *array;
      int elemsize;
--- 744,747 ----
***************
*** 831,835 ****
      {
      	char *newelem = ((char *)array->a_vec) + nitems * elemsize;
!     	int i = 0, nnew = newsize - nitems;
      	
      	while (nnew--)
--- 825,829 ----
      {
      	char *newelem = ((char *)array->a_vec) + nitems * elemsize;
!     	int nnew = newsize - nitems;
      	
      	while (nnew--)
***************
*** 1024,1029 ****
      t_template *template = template_findbyname(templatesym);
      t_gstub *gs = gp->gp_stub;
-     t_word *vec; 
-     t_getvariable *vp;
      int onset, type;
      t_word *w;
--- 1018,1021 ----

Index: g_scalar.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_scalar.c,v
retrieving revision 1.1.1.2.2.2
retrieving revision 1.1.1.2.2.2.2.1
diff -C2 -d -r1.1.1.2.2.2 -r1.1.1.2.2.2.2.1
*** g_scalar.c	18 Nov 2003 10:34:10 -0000	1.1.1.2.2.2
--- g_scalar.c	1 Apr 2004 23:22:02 -0000	1.1.1.2.2.2.2.1
***************
*** 168,172 ****
  {
      t_scalar *x = (t_scalar *)z;
-     int hit = 0;
      t_template *template = template_findbyname(x->sc_template);
      t_canvas *templatecanvas = template_findcanvas(template);
--- 168,171 ----
***************
*** 332,337 ****
      t_scalar *x = (t_scalar *)z;
      t_binbuf *b2 = binbuf_new();
-     t_atom a, *argv;
-     int i, argc;
      canvas_writescalar(x->sc_template, x->sc_vec, b2, 0);
      binbuf_addv(b, "ss", &s__X, gensym("scalar"));
--- 331,334 ----
***************
*** 374,379 ****
  static void scalar_free(t_scalar *x)
  {
-     int i;
-     t_dataslot *datatypes, *dt;
      t_symbol *templatesym = x->sc_template;
      t_template *template = template_findbyname(templatesym);
--- 371,374 ----

Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.1.1.4.2.2.2.6
retrieving revision 1.1.1.4.2.2.2.7
diff -C2 -d -r1.1.1.4.2.2.2.6 -r1.1.1.4.2.2.2.7
*** g_text.c	30 Mar 2004 01:35:09 -0000	1.1.1.4.2.2.2.6
--- g_text.c	1 Apr 2004 23:22:02 -0000	1.1.1.4.2.2.2.7
***************
*** 88,92 ****
      t_text *x;
      int argc;
!     int broken = 0;
      t_atom *argv;
      newest = 0;
--- 88,92 ----
      t_text *x;
      int argc;
! /*    int broken = 0;*/
      t_atom *argv;
      newest = 0;
***************
*** 139,143 ****
  void canvas_obj(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
  {
-     t_text *x;
      if (argc >= 2)
      {
--- 139,142 ----
***************
*** 177,180 ****
--- 176,180 ----
  }
  
+ /*
  void canvas_guiext(t_glist *gl, t_symbol *guiobjname, int argc, t_atom *argv)
  {
***************
*** 183,186 ****
--- 183,187 ----
  	canvas_iemguis(gl, atom_getsymbol(&argv[0]));
  }
+ */
  
  #define CONSTR(name1,name2) \

Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.1.1.3.2.2
retrieving revision 1.1.1.3.2.2.2.1
diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.2.2.1
*** g_template.c	14 Jan 2004 15:50:28 -0000	1.1.1.3.2.2
--- g_template.c	1 Apr 2004 23:22:02 -0000	1.1.1.3.2.2.2.1
***************
*** 141,145 ****
      int *p_type, t_symbol **p_arraytype)
  {
-     t_template *t;
      int i, n;
      if (!x)
--- 141,144 ----
***************
*** 263,267 ****
      int *conformaction, t_word *wfrom, t_word *wto)
  {
!     int nfrom = tfrom->t_n, nto = tto->t_n, i;
      for (i = 0; i < nto; i++)
      {
--- 262,267 ----
      int *conformaction, t_word *wfrom, t_word *wto)
  {
!     /*int nfrom = tfrom->t_n; why is this unused ???*/
!     int nto = tto->t_n, i;
      for (i = 0; i < nto; i++)
      {
***************
*** 283,287 ****
      t_scalar *x;
      t_gpointer gp;
!     int nto = tto->t_n, nfrom = tfrom->t_n, i;
      t_template *scalartemplate;
      /* post("conform scalar"); */
--- 283,288 ----
      t_scalar *x;
      t_gpointer gp;
!     /*int nto = tto->t_n, nfrom = tfrom->t_n; unused??? */
!     int i;
      t_template *scalartemplate;
      /* post("conform scalar"); */
***************
*** 448,455 ****
  t_template *template_findbyname(t_symbol *s)
  {
!     int i;
!     if (s == &s_float)
!     	return (&template_float);
!     else return ((t_template *)pd_findbyclass(s, template_class));
  }
  
--- 449,454 ----
  t_template *template_findbyname(t_symbol *s)
  {
!     return s==&s_float ? &template_float :
! 	(t_template *)pd_findbyclass(s, template_class);
  }
  
***************
*** 541,545 ****
      t_template *t = template_findbyname(sym);
      int i;
-     t_symbol *sx = gensym("x");
      x->x_owner = canvas_getcurrent();
      x->x_next = 0;
--- 540,543 ----
***************
*** 594,598 ****
  static void *gtemplate_new(t_symbol *s, int argc, t_atom *argv)
  {
!     t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class);
      t_symbol *sym = atom_getsymbolarg(0, argc, argv);
      if (argc >= 1)
--- 592,596 ----
  static void *gtemplate_new(t_symbol *s, int argc, t_atom *argv)
  {
! /*    t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class); */
      t_symbol *sym = atom_getsymbolarg(0, argc, argv);
      if (argc >= 1)
***************
*** 604,608 ****
  static void *gtemplate_new_old(t_symbol *s, int argc, t_atom *argv)
  {
!     t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class);
      t_symbol *sym = canvas_makebindsym(canvas_getcurrent()->gl_name);
      static int warned;
--- 602,606 ----
  static void *gtemplate_new_old(t_symbol *s, int argc, t_atom *argv)
  {
! /*    t_gtemplate *x = (t_gtemplate *)pd_new(gtemplate_class); */
      t_symbol *sym = canvas_makebindsym(canvas_getcurrent()->gl_name);
      static int warned;
***************
*** 849,853 ****
  static int rangecolor(int n)	/* 0 to 9 in 5 steps */
  {
!     int n2 = n/2;   	    	/* 0 to 4 */
      int ret = (n << 6);     	/* 0 to 256 in 5 steps */
      if (ret > 255) ret = 255;
--- 847,851 ----
  static int rangecolor(int n)	/* 0 to 9 in 5 steps */
  {
! /*    int n2 = n/2;   	    	0 to 4 */
      int ret = (n << 6);     	/* 0 to 256 in 5 steps */
      if (ret > 255) ret = 255;
***************
*** 878,882 ****
      	if (n > 1)
      	{
!     	    int flags = x->x_flags, closed = (flags & CLOSED);
      	    float width = fielddesc_getfloat(&x->x_width, template, data, 1);
      	    char outline[20], fill[20];
--- 876,881 ----
      	if (n > 1)
      	{
!     	    int flags = x->x_flags;
! 	    /*int closed = (flags & CLOSED); */
      	    float width = fielddesc_getfloat(&x->x_width, template, data, 1);
      	    char outline[20], fill[20];
***************
*** 1061,1066 ****
      t_plot *x = (t_plot *)pd_new(plot_class);
      int flags = 0;
-     int nxy, i;
-     t_fielddesc *fd;
      t_symbol *firstarg = atom_getsymbolarg(0, argc, argv);
      if (!strcmp(firstarg->s_name, "curve"))
--- 1060,1063 ----
***************
*** 1133,1137 ****
      int *xonsetp, int *yonsetp, int *wonsetp)
  {
!     int arrayonset, elemsize, yonset, wonset, xonset, type;
      t_template *elemtemplate;
      t_symbol *dummy;
--- 1130,1134 ----
      int *xonsetp, int *yonsetp, int *wonsetp)
  {
!     int elemsize, yonset, wonset, xonset, type;
      t_template *elemtemplate;
      t_symbol *dummy;

Index: u_object.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/u_object.tk,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -C2 -d -r1.1.2.13 -r1.1.2.14
*** u_object.tk	30 Mar 2004 01:35:09 -0000	1.1.2.13
--- u_object.tk	1 Apr 2004 23:22:01 -0000	1.1.2.14
***************
*** 419,422 ****
--- 419,426 ----
  }
  
+ proc radio_select {self canvas v} {
+ 	bluebox_select $self $canvas $v
+ }
+ 
  proc radio_erase {self canvas} {
  	bluebox_erase $self $canvas

Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.1.1.4.2.7.2.8
retrieving revision 1.1.1.4.2.7.2.9
diff -C2 -d -r1.1.1.4.2.7.2.8 -r1.1.1.4.2.7.2.9
*** g_canvas.c	30 Mar 2004 04:57:55 -0000	1.1.1.4.2.7.2.8
--- g_canvas.c	1 Apr 2004 23:22:01 -0000	1.1.1.4.2.7.2.9
***************
*** 477,481 ****
      t_symbol *sym;
      float x1,y1,x2,y2,px1,py1,px2,py2;
!     pd_scanargs(argc,argv,"sffffffff",&x1,&y1,&x2,&y2,&px1,&py1,&px2,&py2);
      glist_addglist(g, sym, x1, y1, x2, y2, px1, py1, px2, py2);
  }
--- 477,481 ----
      t_symbol *sym;
      float x1,y1,x2,y2,px1,py1,px2,py2;
!     pd_scanargs(argc,argv,"sffffffff",&sym,&x1,&y1,&x2,&y2,&px1,&py1,&px2,&py2);
      glist_addglist(g, sym, x1, y1, x2, y2, px1, py1, px2, py2);
  }
***************
*** 1324,1328 ****
  //DECL(canvas_guiext)
  
! void canvas_click_on_wire(t_canvas *self, t_symbol linesym,
  t_float x, t_float y, t_float b, t_float f);
  
--- 1324,1330 ----
  //DECL(canvas_guiext)
  
! void canvas_click_on_object(t_canvas *self, t_symbol linesym,
! t_float x, t_float y, t_float b, t_float f);
! void canvas_click_on_wire  (t_canvas *self, t_symbol linesym,
  t_float x, t_float y, t_float b, t_float f);
  
***************
*** 1368,1372 ****
      
  /* ------------------------ gui stuff --------------------------- */
!     class_addmethod(c, (t_method)canvas_click_on_wire, gensym("click-on-wire"),
  	A_SYMBOL, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
      class_addmethod(c, (t_method)canvas_pop, gensym("pop"), A_DEFFLOAT, A_NULL);
--- 1370,1376 ----
      
  /* ------------------------ gui stuff --------------------------- */
!     class_addmethod(c, (t_method)canvas_click_on_object, gensym("click-on-object"),
! 	A_SYMBOL, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
!     class_addmethod(c, (t_method)canvas_click_on_wire,   gensym("click-on-wire"),
  	A_SYMBOL, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
      class_addmethod(c, (t_method)canvas_pop, gensym("pop"), A_DEFFLOAT, A_NULL);

Index: g_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_array.c,v
retrieving revision 1.1.1.3.2.2.2.2
retrieving revision 1.1.1.3.2.2.2.3
diff -C2 -d -r1.1.1.3.2.2.2.2 -r1.1.1.3.2.2.2.3
*** g_array.c	30 Mar 2004 01:35:09 -0000	1.1.1.3.2.2.2.2
--- g_array.c	1 Apr 2004 23:22:01 -0000	1.1.1.3.2.2.2.3
***************
*** 297,301 ****
  static int array_motion_npoints;
  static int array_motion_elemsize;
! static int array_motion_altkey;
  static float array_motion_initx;
  static float array_motion_xperpix;
--- 297,301 ----
  static int array_motion_npoints;
  static int array_motion_elemsize;
! /*static int array_motion_altkey;*/
  static float array_motion_initx;
  static float array_motion_xperpix;

Index: g_graph.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v
retrieving revision 1.1.1.3.2.3.2.5
retrieving revision 1.1.1.3.2.3.2.6
diff -C2 -d -r1.1.1.3.2.3.2.5 -r1.1.1.3.2.3.2.6
*** g_graph.c	30 Mar 2004 01:35:09 -0000	1.1.1.3.2.3.2.5
--- g_graph.c	1 Apr 2004 23:22:01 -0000	1.1.1.3.2.3.2.6
***************
*** 11,14 ****
--- 11,15 ----
  #include "t_tk.h"
  #include "g_canvas.h"
+ #include "g_all_guis.h"
  #include <stdio.h>
  #include <string.h>

Index: g_rtext.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_rtext.c,v
retrieving revision 1.1.1.2.2.6.2.5
retrieving revision 1.1.1.2.2.6.2.6
diff -C2 -d -r1.1.1.2.2.6.2.5 -r1.1.1.2.2.6.2.6
*** g_rtext.c	30 Mar 2004 01:35:09 -0000	1.1.1.2.2.6.2.5
--- g_rtext.c	1 Apr 2004 23:22:01 -0000	1.1.1.2.2.6.2.6
***************
*** 366,370 ****
  {
      int w = 0, h = 0, indx, i, newsize, ndel;
-     char *s1, *s2;
      t_glist *glist = x->x_glist;
      t_canvas *canvas = glist_getcanvas(glist);
--- 366,369 ----

Index: g_io.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_io.c,v
retrieving revision 1.1.1.1.16.2.2.2
retrieving revision 1.1.1.1.16.2.2.3
diff -C2 -d -r1.1.1.1.16.2.2.2 -r1.1.1.1.16.2.2.3
*** g_io.c	28 Mar 2004 08:21:42 -0000	1.1.1.1.16.2.2.2
--- g_io.c	1 Apr 2004 23:22:01 -0000	1.1.1.1.16.2.2.3
***************
*** 97,101 ****
  }
  
! static int tot;
  
  t_int *vinlet_perform(t_int *w)
--- 97,101 ----
  }
  
! //static int tot;
  
  t_int *vinlet_perform(t_int *w)
***************
*** 160,164 ****
      	int switched)
  {
!     t_signal *insig, *outsig;
      x->x_updown.downsample = downsample;
      x->x_updown.upsample   = upsample;
--- 160,164 ----
      	int switched)
  {
!     t_signal *insig;
      x->x_updown.downsample = downsample;
      x->x_updown.upsample   = upsample;
***************
*** 461,465 ****
      if (reblock)
      {
! 	t_signal *insig, *outsig;
  	int parentvecsize, bufsize, oldbufsize;
  	int re_parentvecsize; /* IOhannes */
--- 461,465 ----
      if (reblock)
      {
! 	t_signal *outsig;
  	int parentvecsize, bufsize, oldbufsize;
  	int re_parentvecsize; /* IOhannes */

Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.1.1.4.2.3.2.7
retrieving revision 1.1.1.4.2.3.2.8
diff -C2 -d -r1.1.1.4.2.3.2.7 -r1.1.1.4.2.3.2.8
*** g_editor.c	30 Mar 2004 04:57:55 -0000	1.1.1.4.2.3.2.7
--- g_editor.c	1 Apr 2004 23:22:01 -0000	1.1.1.4.2.3.2.8
***************
*** 898,903 ****
  void canvas_click_on_wire(t_canvas *self, t_symbol *linesym,
  t_float x, t_float y, t_float b, t_float f) {
- 	post("canvas_click_on_wire: 0x%08x %s %f %f %f %f",
- 		(unsigned)self, linesym->s_name, x, y, b, f);
      int mod = (int)f;
      int shiftmod = mod & SHIFTMOD;
--- 898,901 ----
***************
*** 905,908 ****
--- 903,908 ----
      int altmod = mod & ALTMOD;
      int rightclick = mod & RIGHTCLICK;
+     post("canvas_click_on_wire: 0x%08x %s %f %f %f %f",
+ 		(unsigned)self, linesym->s_name, x, y, b, f);
      //post("shiftmod=%d runmode=%d altmod=%d rightclick=%d b=%f f=%f",shiftmod,runmode,altmod,rightclick,b,f);
      if (!runmode && !altmod && !shiftmod && !rightclick) {
***************
*** 915,918 ****
--- 915,932 ----
  }
  
+ void canvas_click_on_object(t_canvas *self, t_symbol *linesym,
+ t_float x, t_float y, t_float b, t_float f) {
+     int mod = (int)f;
+     int shiftmod = mod & SHIFTMOD;
+     int runmode = (mod & CTRLMOD) || !self->gl_edit;
+     int altmod = mod & ALTMOD;
+     int rightclick = mod & RIGHTCLICK;
+     post("canvas_click_on_object: 0x%08x %s %f %f %f %f",
+ 		(unsigned)self, linesym->s_name, x, y, b, f);
+     //post("shiftmod=%d runmode=%d altmod=%d rightclick=%d b=%f f=%f",shiftmod,runmode,altmod,rightclick,b,f);
+     if (!runmode && !altmod && !shiftmod && !rightclick) {
+     }
+ }
+ 
  /* mouse click */
  void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
***************
*** 1002,1010 ****
      	else
      	{
!     	    	/* look for an outlet */
  	    int noutlet,ninlet;
      	    if (ob && (noutlet = obj_noutlets(ob)) && ypos >= y2-4)
      	    {
!     	    	int width = x2-x1;
      	    	int nout1 = noutlet>1 ? noutlet-1 : 1;
      	    	int closest = ((xpos-x1) * nout1 + width/2)/width;
--- 1016,1024 ----
      	else
      	{
! /* make new wire? */
  	    int noutlet,ninlet;
      	    if (ob && (noutlet = obj_noutlets(ob)) && ypos >= y2-4)
      	    {
! /*    	    	int width = x2-x1;
      	    	int nout1 = noutlet>1 ? noutlet-1 : 1;
      	    	int closest = ((xpos-x1) * nout1 + width/2)/width;
***************
*** 1018,1023 ****
      	    	    	x->gl_editor->e_xwas = xpos;
      	    	    	x->gl_editor->e_ywas = ypos;
!     	    	    	sys_vgui(
!     	    	    	  "wire_draw x .x%x.c %d %d %d %d %d\n",
      	    	    	    	x, (issignal ? 2 : 1), xpos, ypos, xpos, ypos);
      	    	    }    	    	    	    	
--- 1032,1036 ----
      	    	    	x->gl_editor->e_xwas = xpos;
      	    	    	x->gl_editor->e_ywas = ypos;
!     	    	    	sys_vgui("wire_draw x .x%x.c %d %d %d %d %d\n",
      	    	    	    	x, (issignal ? 2 : 1), xpos, ypos, xpos, ypos);
      	    	    }    	    	    	    	
***************
*** 1025,1030 ****
      	    	}
  		else if (doit) goto nooutletafterall;
!     	    }
!     	    	/* look for an inlet */
      	    else if (ob && (ninlet = obj_ninlets(ob)) && ypos <= y1+4)
      	    {
--- 1038,1044 ----
      	    	}
  		else if (doit) goto nooutletafterall;
! */
! 	    }
! /* look for an inlet */
      	    else if (ob && (ninlet = obj_ninlets(ob)) && ypos <= y1+4)
      	    {

Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.1.1.4.2.7.4.29
retrieving revision 1.1.1.4.2.7.4.30
diff -C2 -d -r1.1.1.4.2.7.4.29 -r1.1.1.4.2.7.4.30
*** u_main.tk	30 Mar 2004 06:20:06 -0000	1.1.1.4.2.7.4.29
--- u_main.tk	1 Apr 2004 23:22:01 -0000	1.1.1.4.2.7.4.30
***************
*** 464,471 ****
      set pd_undoaction $undoaction
      set pd_redoaction $redoaction
!     if {$name != "nobody"} {
! #    unpleasant way of avoiding a more unpleasant bug situation --atl 2002.11.25
!         menu_fixeditmenu $name
!     }
  }
  
--- 464,468 ----
      set pd_undoaction $undoaction
      set pd_redoaction $redoaction
!     if {$name != "nobody"} {menu_fixeditmenu $name}
  }
  
***************
*** 496,500 ****
  proc find_apply {name} {
      global find_string find_canvas
!     regsub -all \; $find_string " _semi_ " find_string2
      regsub -all \, $find_string2 " _comma_ " find_string3
      pd "$find_canvas find $find_string3 ;"
--- 493,497 ----
  proc find_apply {name} {
      global find_string find_canvas
!     regsub -all \; $find_string  " _semi_ "  find_string2
      regsub -all \, $find_string2 " _comma_ " find_string3
      pd "$find_canvas find $find_string3 ;"
***************
*** 543,547 ****
  	    return
      }
!     $self.stat.what configure -text "..."
  }
  
--- 540,544 ----
  	    return
      }
!     $self.stat.what configure -text "... $tags"
  }
  
***************
*** 787,794 ****
      set tags [$canvas gettags [lindex $stack end]]
      puts stderr "(click) $canvas $x $y $b $f : $tags "
!     if {[regexp {^([a-f0-9]{7})} $tags tag]} {
  	    global _
  	    if {[info exists _($tag:class)]} {set class $_($tag:class)} {set class unknown}
  	    puts stderr "(.....) $tag is a \[$class\] object"
  	    return
      }
--- 784,792 ----
      set tags [$canvas gettags [lindex $stack end]]
      puts stderr "(click) $canvas $x $y $b $f : $tags "
!     if {[regexp {^(?:\.x)?([a-f0-9]{7})} $tags tag]} {
  	    global _
  	    if {[info exists _($tag:class)]} {set class $_($tag:class)} {set class unknown}
  	    puts stderr "(.....) $tag is a \[$class\] object"
+ 	    pd "[canvastosym $canvas] click-on-object $tag $x $y $b $f;"
  	    return
      }
***************
*** 844,851 ****
      hide_canvas_tooltip $name
      if {$pd_nt == 2} {
! 	if {$key=="BackSpace"} {set key   8; set keynum   8}
! 	if {$key=="Delete"}    {set key   8; set keynum   8}
      }
!     if {$key == "KP_Delete"}     {set key 127; set keynum 127}
      if {$iso != ""} {
      	scan $iso %c keynum 
--- 842,851 ----
      hide_canvas_tooltip $name
      if {$pd_nt == 2} {
! 	switch -- $key {
! 	  BackSpace {set key 8; set keynum 8}
! 	  Delete    {set key 8; set keynum 8}
! 	}
      }
!     if {$key == "KP_Delete"} {set key 127; set keynum 127}
      if {$iso != ""} {
      	scan $iso %c keynum 
***************
*** 1018,1076 ****
      global _
      foreach {name label type options} $struct {
          switch -- $type {
  	    side {
! 		frame .$self.$name
! 		label .$self.$name.label -text $label
! 		pack  .$self.$name.label -side left
! 		frame .$self.$name.side -relief ridge -borderwidth 2
! 		pack  .$self.$name.side -side top
  		foreach {i side} {0 left 1 right 2 top 3 bottom} {
! 			radiobutton .$self.$name.side.$side -value $i \
  				-variable _($self:$name) -text $side
  		}
! 		pack .$self.$name.side.left   -side   left -fill y
! 		pack .$self.$name.side.right  -side  right -fill y
! 		pack .$self.$name.side.top    -side    top
! 		pack .$self.$name.side.bottom -side bottom
! 		pack .$self.$name -side top
  	    }
  	    color {
! 		frame .$self.$name
! 		label .$self.$name.label -text $label
  		# wtf, %6.6x sometimes gives me _8_ chars !?!
  		set c [expr $_($self:$name) & 0xFCFCFC]
! 		button .$self.$name.color -text "      " -width 10 \
  			-command [list iemgui_choose_col .$self $name $label] \
  			-relief sunken -background [format #%6.6x $c] \
  			-highlightbackground       [format #%6.6x $c]
  		
! 		button .$self.$name.preset -text "..." -command [list color_popup $self $name $i]
! 		pack  .$self.$name.label .$self.$name.color .$self.$name.preset -side left
! 		pack .$self.$name -side top
  	    }
  	    choice {
  		set i 0
  		foreach part $label {
! 			radiobutton .$self.$name$i -text $part -value $i -variable _($self:$name)
! 			pack .$self.$name$i -side top
  			incr i
  		}
  	    }
  	    toggle {
! 		checkbutton .$self.$name -text $label -variable _($self:$name)
! 		pack .$self.$name -side top
  	    }
  	    default {
! 		frame .$self.$name
! 		label .$self.$name.label -text $label
! 		pack  .$self.$name.label -side left
! 		eval "entry .$self.$name.entry -textvariable _($self:$name) $options"
! 		pack .$self.$name.entry -side left
! 		bind .$self.$name.entry <Return> "$ok .$self"
  		if {[string compare $type "entry"]} {
! 			label .$self.$name.type -text "($type)"
! 			pack .$self.$name.type
  		}
! 		pack .$self.$name -side top
  	    }
  	}
--- 1018,1077 ----
      global _
      foreach {name label type options} $struct {
+ 	set f .$self.$name
          switch -- $type {
  	    side {
! 		frame $f
! 		label $f.label -text $label
! 		pack  $f.label -side left
! 		frame $f.side -relief ridge -borderwidth 2
! 		pack  $f.side -side top
  		foreach {i side} {0 left 1 right 2 top 3 bottom} {
! 			radiobutton $f.side.$side -value $i \
  				-variable _($self:$name) -text $side
  		}
! 		pack $f.side.left   -side   left -fill y
! 		pack $f.side.right  -side  right -fill y
! 		pack $f.side.top    -side    top
! 		pack $f.side.bottom -side bottom
! 		pack $f -side top
  	    }
  	    color {
! 		frame $f
! 		label $f.label -text $label
  		# wtf, %6.6x sometimes gives me _8_ chars !?!
  		set c [expr $_($self:$name) & 0xFCFCFC]
! 		button $f.color -text "      " -width 10 \
  			-command [list iemgui_choose_col .$self $name $label] \
  			-relief sunken -background [format #%6.6x $c] \
  			-highlightbackground       [format #%6.6x $c]
  		
! 		button $f.preset -text "..." -command [list color_popup $self $name $i]
! 		pack  $f.label $f.color $f.preset -side left
! 		pack $f -side top
  	    }
  	    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 {
! 		checkbutton $f -text $label -variable _($self:$name)
! 		pack $f -side top
  	    }
  	    default {
! 		frame $f
! 		label $f.label -text $label
! 		pack  $f.label -side left
! 		eval "entry $f.entry -textvariable _($self:$name) $options"
! 		pack $f.entry -side left
! 		bind $f.entry <Return> "$ok .$self"
  		if {[string compare $type "entry"]} {
! 			label $f.type -text "($type)"
! 			pack $f.type
  		}
! 		pack $f -side top
  	    }
  	}
***************
*** 1971,1975 ****
  		text .log.1 -width 60 -height 10 -yscrollcommand ".log.2 set"
  		scrollbar .log.2 -command ".log.1 yview"
! 		.log.1 insert end "This is the PureData log\n"
  		pack .log.1 -side left -fill both -expand yes
  		pack .log.2 -side left -fill    y -expand no
--- 1972,1978 ----
  		text .log.1 -width 60 -height 10 -yscrollcommand ".log.2 set"
  		scrollbar .log.2 -command ".log.1 yview"
! 		global tcl_version tk_version pd_myversion
! 		.log.1 insert end "$pd_myversion"
! 		.log.1 insert end "Tcl $tcl_version, Tk $tk_version\n"
  		pack .log.1 -side left -fill both -expand yes
  		pack .log.2 -side left -fill    y -expand no





More information about the Pd-cvs mailing list