Update of /cvsroot/pure-data/externals/bbogart/entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17421
Modified Files: entry.c Log Message: removed my silly experiment of setting canvas_name and widget_name centralling and put back all of the formats back into sys_vgui
Index: entry.c =================================================================== RCS file: /cvsroot/pure-data/externals/bbogart/entry/entry.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** entry.c 27 Oct 2007 23:50:16 -0000 1.15 --- entry.c 28 Oct 2007 02:09:28 -0000 1.16 *************** *** 29,32 **** --- 29,33 ---- /* TODO: make message to add a single character to the existing text */ /* TODO: make scrollbar (check .printout.text in u_main.tk) */ + /* TODO: make erase_inlets() called by ( !editmode && !firsttime ) */
#ifdef _MSC_VER *************** *** 51,57 **** int x_rect_height; t_symbol* x_receive_name; - - char *x_widget_name; - char *x_canvas_name; /* TODO: these all should be settable by messages */ --- 52,55 ---- *************** *** 119,123 **** }
- static void draw_inlets(t_entry *x, t_glist *glist, int firsttime, int nin, int nout) { --- 117,120 ---- *************** *** 125,129 ****
int nplus, i, onset; ! nplus = (nin == 1 ? 1 : nin-1); /* inlets */ --- 122,127 ----
int nplus, i, onset; ! t_canvas *canvas = glist_getcanvas(glist); ! nplus = (nin == 1 ? 1 : nin-1); /* inlets */ *************** *** 133,144 **** if (firsttime) { ! DEBUG(post("%s create rectangle %d %d %d %d -tags {%xi%d %xi}\n", ! x->x_canvas_name, ! onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) - 1, x, i, x);); ! sys_vgui("%s create rectangle %d %d %d %d -tags {%xi%d %xi}\n", ! x->x_canvas_name, ! onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) - 1, x, i, x); --- 131,140 ---- if (firsttime) { ! DEBUG(post(".x%x.c create rectangle %d %d %d %d -tags {%xi%d %xi}\n", ! canvas, onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) - 1, x, i, x);); ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags {%xi%d %xi}\n", ! canvas, onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) - 1, x, i, x); *************** *** 146,156 **** else { ! DEBUG(post("%s coords %xi%d %d %d %d %d\n", ! x->x_canvas_name, x, i, ! onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) - 1);); ! sys_vgui("%s coords %xi%d %d %d %d %d\n", ! x->x_canvas_name, x, i, ! onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist)- 1); } --- 142,150 ---- else { ! DEBUG(post(".x%x.c coords %xi%d %d %d %d %d\n", ! canvas, x, i, onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) - 1);); ! sys_vgui(".x%x.c coords %xi%d %d %d %d %d\n", ! canvas, x, i, onset, text_ypix(&x->x_obj, glist) - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist)- 1); } *************** *** 162,173 **** if (firsttime) { ! DEBUG(post("%s create rectangle %d %d %d %d -tags {%xo%d %xo}\n", ! x->x_canvas_name, ! onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1, x, i, x);); ! sys_vgui("%s create rectangle %d %d %d %d -tags {%xo%d %xo}\n", ! x->x_canvas_name, ! onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1, x, i, x); --- 156,165 ---- if (firsttime) { ! DEBUG(post(".x%x.c create rectangle %d %d %d %d -tags {%xo%d %xo}\n", ! canvas, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1, x, i, x);); ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags {%xo%d %xo}\n", ! canvas, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1, x, i, x); *************** *** 175,184 **** else { ! DEBUG(post("%s coords %xo%d %d %d %d %d\n", ! x->x_canvas_name, x, i, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1);); ! sys_vgui("%s coords %xo%d %d %d %d %d\n", ! x->x_canvas_name, x, i, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1); --- 167,176 ---- else { ! DEBUG(post(".x%x.c coords %xo%d %d %d %d %d\n", ! canvas, x, i, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1);); ! sys_vgui(".x%x.c coords %xo%d %d %d %d %d\n", ! canvas, x, i, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 2, onset + IOWIDTH, text_ypix(&x->x_obj, glist) + x->x_rect_height-1); *************** *** 193,204 ****
if (firsttime) ! sys_vgui("%s create rectangle %d %d %d %d -tags %xhandle\n", ! x->x_canvas_name, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12, onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4, x); else ! sys_vgui("%s coords %xhandle %d %d %d %d\n", ! x->x_canvas_name, x, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12, onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4); --- 185,196 ----
if (firsttime) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xhandle\n", ! glist_getcanvas(glist), onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12, onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4, x); else ! sys_vgui(".x%x.c coords %xhandle %d %d %d %d\n", ! glist_getcanvas(glist), x, onset, text_ypix(&x->x_obj, glist) + x->x_rect_height - 12, onset + IOWIDTH-2, text_ypix(&x->x_obj, glist) + x->x_rect_height-4); *************** *** 209,212 **** --- 201,205 ---- { DEBUG(post("create_widget");); + t_canvas *canvas=glist_getcanvas(glist); /* I guess this is for fine-tuning of the rect size based on width and height? */ x->x_rect_width = x->x_width; *************** *** 217,235 ****
/* Seems we have to delete the widget in case it already exists (Provided by Guenter)*/ ! DEBUG(post("destroy %s\n", x->x_widget_name);); ! sys_vgui("destroy %s\n", x->x_widget_name);
! DEBUG(post("text %s -font {helvetica 10} -border 1 -highlightthickness 1 -relief sunken -bg "%s" -fg "%s" \n", ! x->x_widget_name,x->x_bgcolour->s_name,x->x_fgcolour->s_name);); ! sys_vgui("text %s -font {helvetica 10} -border 1 -highlightthickness 1 -relief sunken -bg "%s" -fg "%s" \n", ! x->x_widget_name,x->x_bgcolour->s_name,x->x_fgcolour->s_name); ! DEBUG(post("bind %s <KeyRelease> {+pd %s keyup %%N \;} \n", ! x->x_widget_name, x->x_receive_name->s_name);); ! sys_vgui("bind %s <KeyRelease> {+pd %s keyup %%N \;} \n", ! x->x_widget_name, x->x_receive_name->s_name); ! DEBUG(post("bind %s <Leave> {focus [winfo parent %s]} \n", ! x->x_widget_name, x->x_widget_name);); ! sys_vgui("bind %s <Leave> {focus [winfo parent %s]} \n", ! x->x_widget_name, x->x_widget_name); }
--- 210,228 ----
/* Seems we have to delete the widget in case it already exists (Provided by Guenter)*/ ! DEBUG(post("destroy .x%x.c.s%x\n", canvas, x);); ! sys_vgui("destroy .x%x.c.s%x\n", canvas, x);
! DEBUG(post("text .x%x.c.s%x -font {helvetica 10} -border 1 -highlightthickness 1 -relief sunken -bg "%s" -fg "%s" \n", ! canvas, x, x->x_bgcolour->s_name,x->x_fgcolour->s_name);); ! sys_vgui("text .x%x.c.s%x -font {helvetica 10} -border 1 -highlightthickness 1 -relief sunken -bg "%s" -fg "%s" \n", ! canvas, x,x->x_bgcolour->s_name,x->x_fgcolour->s_name); ! DEBUG(post("bind .x%x.c.s%x <KeyRelease> {+pd %s keyup %%N \;} \n", ! canvas, x, x->x_receive_name->s_name);); ! sys_vgui("bind .x%x.c.s%x <KeyRelease> {+pd %s keyup %%N \;} \n", ! canvas, x, x->x_receive_name->s_name); ! DEBUG(post("bind .x%x.c.s%x <Leave> {focus [winfo parent .x%x.c.s%x]} \n", ! canvas, x, canvas, x);); ! sys_vgui("bind .x%x.c.s%x <Leave> {focus [winfo parent .x%x.c.s%x]} \n", ! canvas, x, canvas, x); }
*************** *** 242,260 **** { create_widget(x,glist); ! DEBUG(post("%s create window %d %d -anchor nw -window %s -tags %xS -width %d -height %d \n", ! x->x_canvas_name,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), ! x->x_widget_name,x, x->x_width, x->x_height);); ! sys_vgui("%s create window %d %d -anchor nw -window %s -tags %xS -width %d -height %d \n", ! x->x_canvas_name,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), ! x->x_widget_name,x, x->x_width, x->x_height); } else { ! DEBUG(post("%s coords %xS %d %d\n", x->x_canvas_name, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist));); ! sys_vgui("%s coords %xS %d %d\n", x->x_canvas_name, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)); } ! draw_inlets(x, glist, firsttime, 1,2); // draw_handle(x, glist, firsttime); } --- 235,257 ---- { create_widget(x,glist); ! DEBUG(post(".x%x.c create window %d %d -anchor nw -window .x%x.c.s%x \ ! -tags %xS -width %d -height %d \n", canvas, ! text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), ! canvas, x, x, x->x_width, x->x_height);); ! sys_vgui(".x%x.c create window %d %d -anchor nw -window .x%x.c.s%x \ ! -tags %xS -width %d -height %d \n", canvas, ! text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist), ! canvas, x,x, x->x_width, x->x_height); } else { ! DEBUG(post(".x%x.c coords %xS %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist));); ! sys_vgui(".x%x.c coords %xS %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)); } ! /* post("canvas: %d glist: %d", canvas->gl_edit, glist->gl_edit); */ ! /* if(canvas->gl_edit) */ ! draw_inlets(x, glist, firsttime, 1,2); // draw_handle(x, glist, firsttime); } *************** *** 264,283 **** { DEBUG(post("entry_erase");); ! DEBUG(post("destroy %s\n",x->x_widget_name);); ! sys_vgui("destroy %s\n",x->x_widget_name);
! DEBUG(post("%s delete %xS\n", x->x_canvas_name, x);); ! sys_vgui("%s delete %xS\n", x->x_canvas_name, x);
! /* inlets and outlets */ ! /* Added tag for all inlets of one instance */ ! DEBUG(post("%s delete %xi\n", x->x_canvas_name,x);); ! sys_vgui("%s delete %xi\n", x->x_canvas_name,x); ! DEBUG(post("%s delete %xo\n", x->x_canvas_name,x);); ! sys_vgui("%s delete %xo\n", x->x_canvas_name,x); /* Added tag for all outlets of one instance */ ! DEBUG(post("%s delete %xhandle\n", x->x_canvas_name,x,0);); ! sys_vgui("%s delete %xhandle\n", x->x_canvas_name,x,0); } --- 261,280 ---- { DEBUG(post("entry_erase");); ! t_canvas *canvas = glist_getcanvas(glist); ! DEBUG(post("destroy .x%x.c.s%x\n", canvas, x);); ! sys_vgui("destroy .x%x.c.s%x\n", canvas, x);
! DEBUG(post(".x%x.c delete %xS\n", canvas, x);); ! sys_vgui(".x%x.c delete %xS\n", canvas, x);
! /* inlets and outlets */ /* Added tag for all inlets of one instance */ ! DEBUG(post(".x%x.c delete %xi\n", canvas,x);); ! sys_vgui(".x%x.c delete %xi\n", canvas,x); ! DEBUG(post(".x%x.c delete %xo\n", canvas,x);); ! sys_vgui(".x%x.c delete %xo\n", canvas,x); /* Added tag for all outlets of one instance */ ! DEBUG(post(".x%x.c delete %xhandle\n", canvas,x,0);); ! sys_vgui(".x%x.c delete %xhandle\n", canvas,x,0); } *************** *** 287,293 ****
! static void entry_getrect(t_gobj *z, t_glist *owner, int *xp1, int *yp1, int *xp2, int *yp2) { int width, height; t_entry* s = (t_entry*)z; --- 284,291 ----
! static void entry_getrect(t_gobj *z, t_glist *owner, int *xp1, int *yp1, int *xp2, int *yp2) { + /* DEBUG(post("entry_getrect");); */ int width, height; t_entry* s = (t_entry*)z; *************** *** 301,318 **** }
! static void entry_displace(t_gobj *z, t_glist *glist, ! int dx, int dy) { t_entry *x = (t_entry *)z; - DEBUG(post("displace");); x->x_obj.te_xpix += dx; x->x_obj.te_ypix += dy; if (glist_isvisible(glist)) { ! DEBUG(post("%s coords %xSEL %d %d %d %d\n", x->x_canvas_name, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2);); ! sys_vgui("%s coords %xSEL %d %d %d %d\n", x->x_canvas_name, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, --- 299,316 ---- }
! static void entry_displace(t_gobj *z, t_glist *glist, int dx, int dy) { + DEBUG(post("entry_displace");); t_entry *x = (t_entry *)z; x->x_obj.te_xpix += dx; x->x_obj.te_ypix += dy; if (glist_isvisible(glist)) { ! t_canvas *canvas = glist_getcanvas(glist); ! DEBUG(post(".x%x.c coords %xSEL %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2);); ! sys_vgui(".x%x.c coords %xSEL %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, *************** *** 320,327 ****
entry_drawme(x, glist, 0); ! canvas_fixlinesfor(glist_getcanvas(glist),(t_text*) x); } ! DEBUG(post("displace end");) ! }
static void entry_select(t_gobj *z, t_glist *glist, int state) --- 318,325 ----
entry_drawme(x, glist, 0); ! canvas_fixlinesfor(canvas, (t_text*) x); } ! DEBUG(post("displace end");); ! }
static void entry_select(t_gobj *z, t_glist *glist, int state) *************** *** 330,340 **** t_entry *x = (t_entry *)z; if (state) { ! DEBUG(post("%s create rectangle %d %d %d %d -tags %xSEL -outline blue\n", ! x->x_canvas_name, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2, x);); ! sys_vgui("%s create rectangle %d %d %d %d -tags %xSEL -outline blue\n", ! x->x_canvas_name, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2, --- 328,338 ---- t_entry *x = (t_entry *)z; if (state) { ! DEBUG(post(".x%x.c create rectangle %d %d %d %d -tags %xSEL -outline blue\n", ! glist_getcanvas(glist), text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2, x);); ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xSEL -outline blue\n", ! glist_getcanvas(glist), text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)-1, text_xpix(&x->x_obj, glist) + x->x_rect_width, text_ypix(&x->x_obj, glist) + x->x_rect_height-2, *************** *** 342,347 **** } else { ! DEBUG(post("%s delete %xSEL\n", x->x_canvas_name, x);); ! sys_vgui("%s delete %xSEL\n", x->x_canvas_name, x); } } --- 340,345 ---- } else { ! DEBUG(post(".x%x.c delete %xSEL\n", glist_getcanvas(glist), x);); ! sys_vgui(".x%x.c delete %xSEL\n", glist_getcanvas(glist), x); } } *************** *** 349,352 **** --- 347,351 ---- static void entry_activate(t_gobj *z, t_glist *glist, int state) { + DEBUG(post("entry_activate");); /* this is currently unused t_text *x = (t_text *)z; *************** *** 358,361 **** --- 357,361 ---- static void entry_delete(t_gobj *z, t_glist *glist) { + DEBUG(post("entry_delete");); t_text *x = (t_text *)z; canvas_deletelinesfor(glist_getcanvas(glist), x); *************** *** 404,411 **** DEBUG(post("append ::entry%lx::list " "\n", x);); sys_vgui("append ::entry%lx::list " "\n", x); ! DEBUG(post("%s insert end $::entry%lx::list ; unset ::entry%lx::list \n", ! x->x_widget_name, x, x );); ! sys_vgui("%s insert end $::entry%lx::list ; unset ::entry%lx::list \n", ! x->x_widget_name, x, x ); }
--- 404,411 ---- DEBUG(post("append ::entry%lx::list " "\n", x);); sys_vgui("append ::entry%lx::list " "\n", x); ! DEBUG(post(".x%x.c.s%x insert end $::entry%lx::list ; unset ::entry%lx::list \n", ! x->x_glist, x, x, x );); ! sys_vgui(".x%x.c.s%x insert end $::entry%lx::list ; unset ::entry%lx::list \n", ! x->x_glist, x, x, x ); }
*************** *** 416,421 **** int i;
! DEBUG(post("%s delete 0.0 end \n", x->x_widget_name);); ! sys_vgui("%s delete 0.0 end \n", x->x_widget_name); entry_add(x, s, argc, argv); } --- 416,421 ---- int i;
! DEBUG(post(".x%x.c.s%x delete 0.0 end \n", x->x_glist, x);); ! sys_vgui(".x%x.c.s%x delete 0.0 end \n", x->x_glist, x); entry_add(x, s, argc, argv); } *************** *** 424,429 **** static void entry_clear(t_entry* x) { ! DEBUG(post("%s delete 0.0 end \n", x->x_widget_name);); ! sys_vgui("%s delete 0.0 end \n", x->x_widget_name); }
--- 424,429 ---- static void entry_clear(t_entry* x) { ! DEBUG(post(".x%x.c.s%x delete 0.0 end \n", x->x_glist, x);); ! sys_vgui(".x%x.c.s%x delete 0.0 end \n", x->x_glist, x); }
*************** *** 439,451 **** { /* With "," and ";" escaping thanks to JMZ */ ! DEBUG(post("pd [concat %s output [string map {"," "\\," ";" "\\;"} [%s get 0.0 end]] \;]\n", ! x->x_receive_name->s_name, x->x_widget_name);); ! sys_vgui("pd [concat %s output [string map {"," "\\," ";" "\\;"} [%s get 0.0 end]] \;]\n", ! x->x_receive_name->s_name, x->x_widget_name);
! DEBUG(post("bind %s <Leave> {focus [winfo parent %s]} \n", ! x->x_widget_name, x->x_widget_name);); ! sys_vgui("bind %s <Leave> {focus [winfo parent %s]} \n", ! x->x_widget_name, x->x_widget_name); }
--- 439,451 ---- { /* With "," and ";" escaping thanks to JMZ */ ! DEBUG(post("pd [concat %s output [string map {"," "\\," ";" "\\;"} [.x%x.c.s%x get 0.0 end]] \;]\n", ! x->x_receive_name->s_name, x->x_glist, x);); ! sys_vgui("pd [concat %s output [string map {"," "\\," ";" "\\;"} [.x%x.c.s%x get 0.0 end]] \;]\n", ! x->x_receive_name->s_name, x->x_glist, x);
! DEBUG(post("bind .x%x.c.s%x <Leave> {focus [winfo parent .x%x.c.s%x]} \n", ! x->x_glist, x, x->x_glist, x);); ! sys_vgui("bind .x%x.c.s%x <Leave> {focus [winfo parent .x%x.c.s%x]} \n", ! x->x_glist, x, x->x_glist, x); }
*************** *** 513,518 **** { x->x_bgcolour = bgcol; ! DEBUG(post("%s configure -background "%s" \n", x->x_widget_name, x->x_bgcolour->s_name);); ! sys_vgui("%s configure -background "%s" \n", x->x_widget_name, x->x_bgcolour->s_name); }
--- 513,520 ---- { x->x_bgcolour = bgcol; ! DEBUG(post(".x%x.c.s%x configure -background "%s" \n", ! x->x_glist, x, x->x_bgcolour->s_name);); ! sys_vgui(".x%x.c.s%x configure -background "%s" \n", ! x->x_glist, x, x->x_bgcolour->s_name); }
*************** *** 521,526 **** { x->x_fgcolour = fgcol; ! DEBUG(post("%s configure -foreground "%s" \n", x->x_widget_name, x->x_fgcolour->s_name);); ! sys_vgui("%s configure -foreground "%s" \n", x->x_widget_name, x->x_fgcolour->s_name); }
--- 523,530 ---- { x->x_fgcolour = fgcol; ! DEBUG(post(".x%x.c.s%x configure -foreground "%s" \n", ! x->x_glist, x, x->x_fgcolour->s_name);); ! sys_vgui(".x%x.c.s%x configure -foreground "%s" \n", ! x->x_glist, x, x->x_fgcolour->s_name); }
*************** *** 543,554 **** char buf[MAXPDSTRING];
- x->x_glist = canvas_getcurrent(); - snprintf(buf, MAXPDSTRING, ".x%lx.c", (long unsigned int) glist_getcanvas(x->x_glist)); - x->x_canvas_name = getbytes(strlen(buf)); - strncpy(x->x_canvas_name, buf, strlen(buf)); - snprintf(buf, MAXPDSTRING, "%s.s%lx", x->x_canvas_name, (long unsigned int) x); - x->x_widget_name = getbytes(strlen(buf)); - strncpy(x->x_widget_name, buf, strlen(buf)); - x->x_height = 1; --- 547,550 ----