Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17642
Modified Files:
Tag: desiredata
desire.c
Log Message:
fixed undoing of delete of floatatom and symbolatom
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.156
retrieving revision 1.1.2.217.2.157
diff -C2 -d -r1.1.2.217.2.156 -r1.1.2.217.2.157
*** desire.c 14 Jul 2007 00:54:50 -0000 1.1.2.217.2.156
--- desire.c 14 Jul 2007 02:04:33 -0000 1.1.2.217.2.157
***************
*** 5707,5711 ****
}
! void canvas_atom(t_canvas *gl, t_atomtype type, t_symbol *s, int argc, t_atom *argv) {
t_gatom *x = (t_gatom *)pd_new(gatom_class);
if (type == A_FLOAT) {SET(width, 5); SETFLOAT(&x->atom, 0);}
--- 5707,5711 ----
}
! void canvas_atom(t_canvas *gl, t_atomtype type, int argc, t_atom *argv) {
t_gatom *x = (t_gatom *)pd_new(gatom_class);
if (type == A_FLOAT) {SET(width, 5); SETFLOAT(&x->atom, 0);}
***************
*** 5730,5741 ****
}
! void canvas_floatatom(t_canvas *gl, t_symbol *s, int argc, t_atom *argv)
! {canvas_atom(gl, A_FLOAT, s, argc, argv);}
! void canvas_symbolatom(t_canvas *gl, t_symbol *s, int argc, t_atom *argv)
! {canvas_atom(gl, A_SYMBOL, s, argc, argv);}
!
! static void gatom_free(t_gatom *x) {
! if (x->rcv) pd_unbind(x, canvas_realizedollar(x->canvas, x->rcv));
! }
extern "C" void text_save(t_gobj *z, t_binbuf *b) {
--- 5730,5736 ----
}
! void canvas_floatatom( t_canvas *gl, t_symbol *s, int argc, t_atom *argv) {canvas_atom(gl, A_FLOAT, argc, argv);}
! void canvas_symbolatom(t_canvas *gl, t_symbol *s, int argc, t_atom *argv) {canvas_atom(gl, A_SYMBOL, argc, argv);}
! static void gatom_free(t_gatom *x) {if (x->rcv) pd_unbind(x, canvas_realizedollar(x->canvas, x->rcv));}
extern "C" void text_save(t_gobj *z, t_binbuf *b) {
***************
*** 5873,5877 ****
}
! /* this supposes that $2=#X and $3=obj */
static void canvas_object_insert(t_canvas *x, t_symbol *s, int argc, t_atom *argv) {
//t_text *o;
--- 5868,5872 ----
}
! /* this supposes that $2=#X */
static void canvas_object_insert(t_canvas *x, t_symbol *s, int argc, t_atom *argv) {
//t_text *o;
***************
*** 5880,5891 ****
if (argv[0].a_type != A_FLOAT) {pd_error(x,"$1 must be float"); return;}
int i = atom_getint(argv);
! /*
! b = binbuf_new();
! binbuf_restore(b, argc-5, argv+5);
! canvas_objtext(x,atom_getintarg(3,argc,argv),atom_getintarg(4,argc,argv),0,b);
! */
! x->next_add = i;
! canvas_obj(x,gensym("obj"),argc-3,argv+3);
! x->next_add = -1;
/* canvas_reorder_last(x,i); */
gobj_changed(x,"children");
--- 5875,5889 ----
if (argv[0].a_type != A_FLOAT) {pd_error(x,"$1 must be float"); return;}
int i = atom_getint(argv);
! if (argv[2].a_type != A_SYMBOL) {pd_error(x,"$2 must be symbol"); return;}
! s = argv[2].a_symbol;
! if (s == gensym("obj")) {
! /* b = binbuf_new(); binbuf_restore(b, argc-5, argv+5);
! canvas_objtext(x,atom_getintarg(3,argc,argv),atom_getintarg(4,argc,argv),0,b); */
! x->next_add = i; canvas_obj(x,gensym("obj"),argc-3,argv+3); x->next_add = -1;
! } else if (s == gensym("floatatom")) {
! x->next_add = i; canvas_atom(x,A_FLOAT, argc-3,argv+3); x->next_add = -1;
! } else if (s == gensym("symbolatom")) {
! x->next_add = i; canvas_atom(x,A_SYMBOL,argc-3,argv+3); x->next_add = -1;
! } else post("UNSUPPORTED object_insert: %s",s->name);
/* canvas_reorder_last(x,i); */
gobj_changed(x,"children");