Revision: 9926 http://pure-data.svn.sourceforge.net/pure-data/?rev=9926&view=rev Author: eighthave Date: 2008-05-27 08:19:14 -0700 (Tue, 27 May 2008)
Log Message: ----------- patch #1975056 show whole subpatch name in window title
http://sourceforge.net/tracker/index.php?func=detail&aid=1975056&gro...
Modified Paths: -------------- branches/pd-extended/v0-40/pd/src/g_canvas.c
Modified: branches/pd-extended/v0-40/pd/src/g_canvas.c =================================================================== --- branches/pd-extended/v0-40/pd/src/g_canvas.c 2008-05-27 11:27:13 UTC (rev 9925) +++ branches/pd-extended/v0-40/pd/src/g_canvas.c 2008-05-27 15:19:14 UTC (rev 9926) @@ -1133,10 +1133,22 @@
/* -------------------------- subcanvases ---------------------- */
-static void *subcanvas_new(t_symbol *s) +static void *subcanvas_new(t_symbol *s, int argc, t_atom *argv) { t_atom a[6]; t_canvas *x, *z = canvas_getcurrent(); + if (argc) + { + int bufsize; + char *buf; + t_binbuf *bb = binbuf_new(); + binbuf_addv(bb, "s", s); + binbuf_add(bb, argc, argv); + binbuf_gettext(bb, &buf, &bufsize); + buf[bufsize] = '\0'; + binbuf_free(bb); + s = gensym(buf); + } if (!*s->s_name) s = gensym("/SUBPATCH/"); SETFLOAT(a, 0); SETFLOAT(a+1, GLIST_DEFCANVASYLOC); @@ -1750,8 +1762,8 @@ A_NULL);
/* ----- subcanvases, which you get by typing "pd" in a box ---- */ - class_addcreator((t_newmethod)subcanvas_new, gensym("pd"), A_DEFSYMBOL, 0); - class_addcreator((t_newmethod)subcanvas_new, gensym("page"), A_DEFSYMBOL, 0); + class_addcreator((t_newmethod)subcanvas_new, gensym("pd"), A_GIMME, 0); + class_addcreator((t_newmethod)subcanvas_new, gensym("page"), A_GIMME, 0);
class_addmethod(canvas_class, (t_method)canvas_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.