diff options
-rw-r--r-- | gui/button.c | 2 | ||||
-rw-r--r-- | gui/fatom.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/gui/button.c b/gui/button.c index ce3703a..49bfb6d 100644 --- a/gui/button.c +++ b/gui/button.c @@ -111,7 +111,7 @@ static void create_widget(t_button *x, t_glist *glist) if (text[i] == '_') text[i] = ' '; } - + sys_vgui("destroy .x%x.c.s%x\n",glist_getcanvas(glist),x); sys_vgui("button .x%x.c.s%x -height %d -text \"%s\" -command button_cb%x\n",canvas,x, x->x_height,text, x); diff --git a/gui/fatom.h b/gui/fatom.h index 785f600..61d86dd 100644 --- a/gui/fatom.h +++ b/gui/fatom.h @@ -1,7 +1,7 @@ /* ------------------------ fatom ----------------------------- */ #define x_val a_pos.a_w.w_float -#define DEBUG(x) +#define DEBUG(x) #include <string.h> #include <stdio.h> @@ -92,7 +92,8 @@ static void draw_handle(t_fatom *x, t_glist *glist, int firsttime) { static void create_widget(t_fatom *x, t_glist *glist) { t_canvas *canvas=glist_getcanvas(glist); - + post("slider create widget"); + sys_vgui("destroy .x%x.c.s%x\n",glist_getcanvas(glist),x); if (!strcmp(x->x_type->s_name,"vslider")) { x->x_rect_width = x->x_width+15; x->x_rect_height = x->x_max-x->x_min+26; @@ -204,6 +205,7 @@ static void fatom_drawme(t_fatom *x, t_glist *glist, int firsttime) DEBUG(post("glist %x canvas %x",x->x_glist,canvas)); create_widget(x,glist); x->x_glist = canvas; + post("create window to hold widget"); sys_vgui(".x%x.c create window %d %d -anchor nw -window .x%x.c.s%x -tags %xS\n", canvas,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)+2,x->x_glist,x,x); @@ -411,7 +413,6 @@ static void *fatom_new(t_fatom* x,t_floatarg max, t_floatarg min, t_floatarg h,t if (h) x->x_width = h; else x->x_width = 15; - x->x_color = gensym("grey"); x->x_bgcolor = gensym("grey"); |