Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12325
Modified Files: Tag: devel_0_39 desire.tk desire.c Log Message: messing with visibility, subscription, debugging
Index: desire.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.tk,v retrieving revision 1.1.2.175 retrieving revision 1.1.2.176 diff -C2 -d -r1.1.2.175 -r1.1.2.176 *** desire.tk 22 Apr 2006 01:33:15 -0000 1.1.2.175 --- desire.tk 22 Apr 2006 03:17:29 -0000 1.1.2.176 *************** *** 602,606 **** set cmd "%W $text" set text [say $text] - puts "text == $text" } set accel [accel_munge $accel] --- 602,605 ---- *************** *** 838,852 ****
def view xy {} { - global focus # if {[info exists focus(createdby)]} { # switch $focus(createdby) { # butt {mset {@x1 @y1} {40 40}} # ctrl { - # if {[string length $focus(objname)] > 0} { - # mset {@x1 @y1} $focus(oldpos) - # } else { # set @x1 $_($canvas:current_x) # set @y1 $_($canvas:current_y) ! # set focus(oldpos) [list $@x1 $@y1]}}}} # todo: should compute GOP stuff here set cx $@x1 --- 837,847 ----
def view xy {} { # if {[info exists focus(createdby)]} { # switch $focus(createdby) { # butt {mset {@x1 @y1} {40 40}} # ctrl { # set @x1 $_($canvas:current_x) # set @y1 $_($canvas:current_y) ! # set focus(oldpos) [list $@x1 $@y1]}}} # todo: should compute GOP stuff here set cx $@x1 *************** *** 998,1002 **** def* Canvas init {{width 400} {height 300} {geometry +0+0} {editable 1}} { super ! global pd_opendir pd_tearoff OS cmdline focus look set name .$self set c .$self.c --- 993,997 ---- def* Canvas init {{width 400} {height 300} {geometry +0+0} {editable 1}} { super ! global pd_opendir pd_tearoff OS cmdline look set name .$self set c .$self.c *************** *** 1460,1467 **** def* Canvas children= {children} { # think of the children!!! ! puts "-----------------------------------------------" ! set born [lwithout $children $@children]; foreach x $born {$x subscribe $self; $x changed; $x canvas= $self} ! puts "---------------- born:$born" ! set dead [lwithout $@children $children]; foreach x $dead {$x unsubscribe $self; $x erase} set @children $children $self changed --- 1455,1462 ---- def* Canvas children= {children} { # think of the children!!! ! set born [lwithout $children $@children] ! foreach x $born {$x subscribe $self; $x changed; $x canvas= $self} ! set dead [lwithout $@children $children] ! foreach x $dead {$x unsubscribe $self; $x erase} set @children $children $self changed *************** *** 1966,1970 **** }
! def* Canvas notice {origin args} { eval [concat [list $self child_changed $origin] $args] } --- 1961,1965 ---- }
! def Canvas notice {origin args} { eval [concat [list $self child_changed $origin] $args] }
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.69 retrieving revision 1.1.2.70 diff -C2 -d -r1.1.2.69 -r1.1.2.70 *** desire.c 21 Apr 2006 15:26:00 -0000 1.1.2.69 --- desire.c 22 Apr 2006 03:17:29 -0000 1.1.2.70 *************** *** 2,6 ****
This file is part of DesireData. ! Copyright (c) 2004,2005 by Mathieu Bouchard. Copyright (c) 1997-2001 Miller Puckette. Portions by Guenther Geiger, Krzysztof Czaja, Johannes Zmoelnig, Thomas Musil, etc. --- 2,6 ----
This file is part of DesireData. ! Copyright (c) 2004-2006 by Mathieu Bouchard. Copyright (c) 1997-2001 Miller Puckette. Portions by Guenther Geiger, Krzysztof Czaja, Johannes Zmoelnig, Thomas Musil, etc. *************** *** 37,40 **** --- 37,41 ---- fprintf(stderr,"class=%s)\n",((t_gobj *)self)->g_pd->c_name->s_name);
+ /* #define sys_vgui(args...) do { \ fprintf(stderr,"\e[0;1;31m"); \ *************** *** 42,45 **** --- 43,47 ---- fprintf(stderr,"\e[0m"); \ sys_vgui(args); } while(0) + */ #endif
*************** *** 103,107 **** t_appendix *d = self->g_adix; int i; ! if (!d) {post("no appendix in owner"); return;} for (i=0; i<d->nobs; i++) { t_gobj *obs = d->obs[i]; --- 105,109 ---- t_appendix *d = self->g_adix; int i; ! if (!d) {post("gobj_changed3: no appendix in %p",self); return;} for (i=0; i<d->nobs; i++) { t_gobj *obs = d->obs[i]; *************** *** 466,469 **** --- 468,473 ---- int glist_valid = 10000;
+ static int hack = 1; + void glist_init(t_glist *x) { /* zero out everyone except "pd" field */ *************** *** 474,477 **** --- 478,483 ---- x->gl_ylabel = (t_symbol **)t_getbytes(0); ((t_gobj *)x)->g_adix = appendix_new((t_gobj *)x); + /* the following is a hack */ + if (hack) gobj_subscribe((t_gobj *)x,(t_gobj *)manager); }
*************** *** 956,960 **** linetraverser_start(&t, x); while ((oc = linetraverser_next(&t))) ! sys_vgui("wire_update %lx %lx %lx %d %lx %d %d", (long)oc, (long)glist_getcanvas(x), (long)t.tr_ob, t.tr_outno, (long)t.tr_ob2, t.tr_inno, (outlet_getsymbol(t.tr_outlet) == &s_signal)); --- 962,966 ---- linetraverser_start(&t, x); while ((oc = linetraverser_next(&t))) ! sys_vgui("wire_update %lx %lx %lx %d %lx %d %d\n", (long)oc, (long)glist_getcanvas(x), (long)t.tr_ob, t.tr_outno, (long)t.tr_ob2, t.tr_inno, (outlet_getsymbol(t.tr_outlet) == &s_signal)); *************** *** 3931,3934 **** --- 3937,3941 ---- { t_binbuf *b; + hack = 0; if (garray_arraytemplatecanvas) return; *************** *** 3947,3951 ****
glob_setfilename(0, &s_, &s_); ! binbuf_free(b); }
--- 3954,3959 ----
glob_setfilename(0, &s_, &s_); ! binbuf_free(b); ! hack = 1; }
*************** *** 5251,5254 **** --- 5259,5266 ---- void glist_add(t_glist *x, t_gobj *y) { + char *buf; int bufn; + binbuf_gettext(((t_text *)y)->te_binbuf,&buf,&bufn); + fprintf(stderr,"glist_add %p %p [%s]\n",x,y,buf); + free(buf); if (!y->g_adix) y->g_adix = appendix_new(y); /* mb: i found no better place for initing this */ gobj_subscribe(y,(t_gobj *)x); *************** *** 10991,10998 **** } if (!x) x = (t_text *)pd_new(text_class); - sys_vgui("global focus; set focus(objname) {%.*s}\n",n,s); - //sys_vgui("global _ focus; set _(%lx:canvas) %lx; set focus(objname) {%.*s}\n",(long)x,(long)gl,n,s); - //sys_vgui("global _ focus; set _(%x:canvas) %lx; set focus(objname) {%.*s}\n",(long)x,(long)gl,s); - //sys_vgui("global _; set _(%x:canvas) %lx\n",(long)x,(long)gl); x->te_binbuf = b; x->te_xpix = xpix; --- 11003,11006 ----