Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19474
Modified Files: Tag: devel_0_39 desire.c desire.h Log Message: removed canvas's connectbuf
Index: desire.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v retrieving revision 1.1.2.48 retrieving revision 1.1.2.49 diff -C2 -d -r1.1.2.48 -r1.1.2.49 *** desire.h 28 Nov 2006 14:28:33 -0000 1.1.2.48 --- desire.h 28 Nov 2006 19:58:09 -0000 1.1.2.49 *************** *** 167,172 **** unsigned int isgraph:1; /* show as graph on parent */ long next_add; /* insertion point for next call to canvas_add (for future use!?) */ - t_binbuf *connectbuf; /* connections to deleted objects */ - t_guiconnect *guiconnect; /* GUI connection for filtering messages */ };
--- 167,170 ----
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.213 retrieving revision 1.1.2.214 diff -C2 -d -r1.1.2.213 -r1.1.2.214 *** desire.c 28 Nov 2006 19:05:36 -0000 1.1.2.213 --- desire.c 28 Nov 2006 19:58:07 -0000 1.1.2.214 *************** *** 538,542 **** pd_pushsym(x); x->next_add = -1; - x->connectbuf = binbuf_new(); return x; } --- 538,541 ---- *************** *** 720,724 **** gfxstub_deleteforkey(x); /* probably unnecessary */ if (!x->owner) canvas_takeofflist(x); - binbuf_free(x->connectbuf); }
--- 719,722 ---- *************** *** 1323,1327 ****
/* save the connections from/to an object and stuff */ ! static void canvas_stowconnections(t_canvas *x, t_gobj *o) { t_gobj *selhead = 0, *seltail = 0, *nonhead = 0, *nontail = 0; /* split list to "selected" and "unselected" parts */ --- 1321,1325 ----
/* save the connections from/to an object and stuff */ ! static t_binbuf *canvas_stowconnections(t_canvas *x, t_gobj *o) { t_gobj *selhead = 0, *seltail = 0, *nonhead = 0, *nontail = 0; /* split list to "selected" and "unselected" parts */ *************** *** 1340,1355 **** else x->list = nonhead, nontail->g_next = selhead; /* add connections to binbuf */ ! binbuf_clear(x->connectbuf); canvas_wires_each(oc,t,x) { if ((o==t.from) != (o==t.to)) ! binbuf_addv(x->connectbuf, "ssiiii;", gensym("#X"), gensym("connect"), canvas_getindex(x, t.from), t.outlet, canvas_getindex(x, t.to), t.inlet); } }
! static void canvas_restoreconnections(t_canvas *x) { pd_bind(x,gensym("#X")); ! binbuf_eval(x->connectbuf, 0, 0, 0); pd_unbind(x,gensym("#X")); } --- 1338,1354 ---- else x->list = nonhead, nontail->g_next = selhead; /* add connections to binbuf */ ! t_binbuf *buf = binbuf_new(); canvas_wires_each(oc,t,x) { if ((o==t.from) != (o==t.to)) ! binbuf_addv(buf, "ssiiii;", gensym("#X"), gensym("connect"), canvas_getindex(x, t.from), t.outlet, canvas_getindex(x, t.to), t.inlet); } + return buf; }
! static void canvas_restoreconnections(t_canvas *x, t_binbuf *buf) { pd_bind(x,gensym("#X")); ! binbuf_eval(buf,0,0,0); pd_unbind(x,gensym("#X")); } *************** *** 6280,6289 **** } else { int xwas = x->te_xpix, ywas = x->te_ypix; ! canvas_stowconnections(canvas_getcanvas(canvas),x); canvas_delete(canvas,x); canvas_objtext(canvas, xwas, ywas, 0, b); /* if it's an abstraction loadbang it here */ if (newest && pd_class(newest) == canvas_class) canvas_loadbang((t_canvas *)newest); ! canvas_restoreconnections(canvas_getcanvas(canvas)); } } else binbuf_text(x->te_binbuf, buf, bufsize); --- 6279,6288 ---- } else { int xwas = x->te_xpix, ywas = x->te_ypix; ! t_binbuf *buf = canvas_stowconnections(canvas_getcanvas(canvas),x); canvas_delete(canvas,x); canvas_objtext(canvas, xwas, ywas, 0, b); /* if it's an abstraction loadbang it here */ if (newest && pd_class(newest) == canvas_class) canvas_loadbang((t_canvas *)newest); ! canvas_restoreconnections(canvas_getcanvas(canvas), buf); } } else binbuf_text(x->te_binbuf, buf, bufsize);