Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26999
Modified Files: Tag: impd_0_37 g_all_guis.c g_bang.c g_toggle.c Log Message: [bng] [tgl] bugfix
Index: g_toggle.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v retrieving revision 1.1.1.3.2.2.2.26 retrieving revision 1.1.1.3.2.2.2.27 diff -C2 -d -r1.1.1.3.2.2.2.26 -r1.1.1.3.2.2.2.27 *** g_toggle.c 13 May 2004 14:37:20 -0000 1.1.1.3.2.2.2.26 --- g_toggle.c 13 Aug 2004 16:23:33 -0000 1.1.1.3.2.2.2.27 *************** *** 68,71 **** --- 68,82 ---- static void toggle_nonzero(t_toggle *x, t_floatarg f) {if (f) x->x_nonzero = f;}
+ static void toggle_savefn(t_toggle *x, t_binbuf *b) { + t_iemgui *y = (t_iemgui *)x; + if (!b) return; + binbuf_clear(b); + pd_savehead(b, y, "tgl"); + pd_saveargs(b,"iiaaaiiiiccci;?", + &y->x_w,&y->x_isa,&y->x_snd,&y->x_rcv,&y->x_lab, + &x->x_gui.x_ldx,&x->x_gui.x_ldy,&y->x_font_style,&y->x_fontsize, + &y->x_bcol,&y->x_fcol,&y->x_lcol,&x->x_on); + } + static void toggle_reload(t_toggle *x, t_symbol *s, int argc, t_atom *argv) { *************** *** 125,128 **** --- 136,140 ---- wb.w_clickfn = 0; class_setwidget(c, &wb); + class_setsavefn(c, toggle_savefn); class_sethelpsymbol(c, gensym("toggle")); }
Index: g_bang.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v retrieving revision 1.1.1.3.2.2.2.30 retrieving revision 1.1.1.3.2.2.2.31 diff -C2 -d -r1.1.1.3.2.2.2.30 -r1.1.1.3.2.2.2.31 *** g_bang.c 13 May 2004 14:37:20 -0000 1.1.1.3.2.2.2.30 --- g_bang.c 13 Aug 2004 16:23:33 -0000 1.1.1.3.2.2.2.31 *************** *** 87,90 **** --- 87,101 ---- static void bng_tick_lck(t_bng *x) {x->x_locked = 0;}
+ static void bng_savefn(t_bng *x, t_binbuf *b) { + t_iemgui *y = (t_iemgui *)x; + if (!b) return; + binbuf_clear(b); + pd_savehead(b, y, "bng"); + pd_saveargs(b, "iiiiaaaiiiiccc", + &y->x_w,&x->x_fthold,&x->x_ftbreak,&y->x_isa,&y->x_snd,&y->x_rcv,&y->x_lab, + &y->x_ldx,&y->x_ldy,&y->x_font_style,&y->x_fontsize, + &y->x_bcol,&y->x_fcol,&y->x_lcol); + } + static void bng_reload(t_bng *x, t_symbol *s, int argc, t_atom *argv) { *************** *** 134,142 **** (t_method)bng_free, sizeof(t_bng), 0, A_GIMME, 0); iemgui_subclass(c); ! class_addbang(c, bng_bang); ! class_addfloat(c, bng_bang2); ! class_addsymbol(c, bng_bang2); ! class_addpointer(c, bng_bang2); ! class_addlist(c, bng_bang2); class_addanything(c, bng_bang2); class_addmethod(c, (t_method)bng_reload, gensym("reload"), A_GIMME, 0); --- 145,153 ---- (t_method)bng_free, sizeof(t_bng), 0, A_GIMME, 0); iemgui_subclass(c); ! class_addbang (c, bng_bang); ! class_addfloat (c, bng_bang2); ! class_addsymbol (c, bng_bang2); ! class_addpointer (c, bng_bang2); ! class_addlist (c, bng_bang2); class_addanything(c, bng_bang2); class_addmethod(c, (t_method)bng_reload, gensym("reload"), A_GIMME, 0); *************** *** 153,156 **** --- 164,168 ---- wb.w_clickfn = 0; class_setwidget(c, &wb); + class_setsavefn(c, bng_savefn); class_sethelpsymbol(c, gensym("bng")); }
Index: g_all_guis.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v retrieving revision 1.1.1.4.2.4.2.40 retrieving revision 1.1.1.4.2.4.2.41 diff -C2 -d -r1.1.1.4.2.4.2.40 -r1.1.1.4.2.4.2.41 *** g_all_guis.c 13 Aug 2004 16:12:53 -0000 1.1.1.4.2.4.2.40 --- g_all_guis.c 13 Aug 2004 16:23:33 -0000 1.1.1.4.2.4.2.41 *************** *** 277,281 ****
EXTERN int pd_savehead(t_binbuf *b, t_iemgui *x, char *name) { ! binbuf_addv(b, "ssiisiiiisssiiiiiii", gensym("#X"),gensym("obj"), (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym(name)); --- 277,281 ----
EXTERN int pd_savehead(t_binbuf *b, t_iemgui *x, char *name) { ! binbuf_addv(b, "ssiis", gensym("#X"),gensym("obj"), (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, gensym(name));