Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27483
Modified Files: Tag: desiredata desire.c Log Message: the "loading" feature: a canvas is only subscribed to the manager when it gets popped
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.125 retrieving revision 1.1.2.217.2.126 diff -C2 -d -r1.1.2.217.2.125 -r1.1.2.217.2.126 *** desire.c 11 Jan 2007 19:29:37 -0000 1.1.2.217.2.125 --- desire.c 11 Jan 2007 20:02:08 -0000 1.1.2.217.2.126 *************** *** 439,451 ****
t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s) { ! t_symbol *ret; ! char *name = s->name; ! if (strchr(name,'$')) { t_canvasenvironment *env = canvas_getenv(x); pd_pushsym(x); ! ret = binbuf_realizedollsym(s, env->argc, env->argv, 1); pd_popsym(x); ! } else ret = s; ! return ret; }
--- 439,450 ----
t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s) { ! if (strchr(s->name,'$')) { t_canvasenvironment *env = canvas_getenv(x); pd_pushsym(x); ! t_symbol *ret = binbuf_realizedollsym(s, env->argc, env->argv, 1); pd_popsym(x); ! return ret; ! } ! return s; }
*************** *** 531,538 **** x->xlabel = (t_symbol **)getbytes(0); x->ylabel = (t_symbol **)getbytes(0); ! if (hack) { /* only manage this canvas if it's not one of the 3 invisible builtin canvases */ gobj_subscribe(x,manager); gobj_changed(x,0); // could be made implicit ! } return x; } --- 530,537 ---- x->xlabel = (t_symbol **)getbytes(0); x->ylabel = (t_symbol **)getbytes(0); ! /*if (hack) { // only manage this canvas if it's not one of the 3 invisible builtin canvases gobj_subscribe(x,manager); gobj_changed(x,0); // could be made implicit ! }*/ return x; } *************** *** 664,672 **** static void canvas_redraw(t_canvas *x) { gobj_changed(x,0); ! canvas_each(y,x) gobj_changed(y,0); ! if (x->owner && canvas_isvisible(x->owner)) { ! graph_vis(x,0); ! graph_vis(x,1); ! } } extern "C" void glob_redraw(void) {canvases_each(x) canvas_redraw(x);} --- 663,669 ---- static void canvas_redraw(t_canvas *x) { gobj_changed(x,0); ! canvas_each(y,x) { ! if (y->_class==canvas_class) canvas_redraw((t_canvas *)y); else gobj_changed(y,0); ! } } extern "C" void glob_redraw(void) {canvases_each(x) canvas_redraw(x);} *************** *** 777,781 **** canvas_resortinlets(x); canvas_resortoutlets(x); ! if (fvis!=0) canvas_vis(x, 1); }
--- 774,783 ---- canvas_resortinlets(x); canvas_resortoutlets(x); ! if (fvis) { ! canvas_vis(x, 1); ! gobj_subscribe(x,manager); ! // gobj_changed(x,0); ! canvas_redraw(x); ! } }
*************** *** 1053,1058 **** static void template_notify(t_template *, t_symbol *s, int argc, t_atom *argv);
- static void canvas_redraw(t_canvas *x); - /* redraw all "scalars" (do this if a drawing command is changed.) LATER we'll use the "template" information to select which ones we --- 1055,1058 ---- *************** *** 3055,3060 **** }
- void canvas_reload(t_symbol *name, t_symbol *dir, t_gobj *except); - /* save a "root" canvas to a file; cf. canvas_saveto() which saves the body (and which is called recursively.) */ --- 3055,3058 ----