[PD-dev] text edit window title

Dan Wilcox danomatika at gmail.com
Thu Jul 13 02:50:02 CEST 2017


I've noticed when opening the context of the text family of objects (qlist, text, & textfile), the window title has what looks like dummy strings: "myname: text".

I think it would be more useful if the "myname" was the name of the parent patch and the "text" part was the name of the calling object.

So something like: mypatch.pd: qlist

That would at least help in differentiating the windows beyond their contents.

I did some poking around and can set the filename by changing the sys_vgui call in textbuf_open:

   sys_vgui("pdtk_textwindow_open .x%lx %dx%d {%s: %s} %d\n",
            x, 600, 340, "myname", "text",
    ...

to

sys_vgui("pdtk_textwindow_open .x%lx %dx%d {%s: %s} %d\n",
            x, 600, 340,  x->b_canvas->gl_name->s_name, "text",

I'm not sure how to replace the "text" dummy with the parent text object type though.

--------
Dan Wilcox
@danomatika <http://twitter.com/danomatika>
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20170713/04da5bd8/attachment.html>


More information about the Pd-dev mailing list