diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c index b7debd7d98095aca02a0b891a3c0a53142c62195..bedbb664d1ecc0e2c931332383cd6bca7783872a 100644 --- a/pd/src/g_bang.c +++ b/pd/src/g_bang.c @@ -390,9 +390,9 @@ static void bng_list(t_bng *x, t_symbol *s, int ac, t_atom *av){bng_bang2(x);} static void bng_anything(t_bng *x, t_symbol *s, int argc, t_atom *argv) {bng_bang2(x);} -static void bng_loadbang(t_bng *x) +static void bng_loadbang(t_bng *x, t_floatarg action) { - if(!sys_noloadbang && x->x_gui.x_loadinit) + if (action == LB_LOAD && x->x_gui.x_loadinit) { bng_set(x); bng_bout(x,0); @@ -528,7 +528,8 @@ void g_bang_setup(void) A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); class_addmethod(bng_class, (t_method)bng_dialog, gensym("dialog"), A_GIMME, 0); - class_addmethod(bng_class, (t_method)bng_loadbang, gensym("loadbang"), 0); + class_addmethod(bng_class, (t_method)bng_loadbang, gensym("loadbang"), + A_DEFFLOAT, 0); class_addmethod(bng_class, (t_method)bng_size, gensym("size"), A_GIMME, 0); iemgui_class_addmethods(bng_class); class_addmethod(bng_class, (t_method)bng_flashtime, gensym("flashtime"), diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c index 0dc859651239a2bab3276d232276359ad3236725..3fdf9473bd2e780e284cd2b546ecf450bcc238a9 100644 --- a/pd/src/g_editor.c +++ b/pd/src/g_editor.c @@ -6116,7 +6116,7 @@ static t_canvas *paste_canvas; static void glist_donewloadbangs(t_glist *x) { - if (x->gl_editor) + if (!sys_noloadbang && x->gl_editor) { t_selection *sel; for (sel = x->gl_editor->e_selection; sel; sel = sel->sel_next) diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index a46532bcce65cd4d0f6c801d6469af4eb48d548b..9de4cf18993fe90dbf5d00ad3eda5edfb5ea82bf 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -683,9 +683,9 @@ static void my_numbox_lin(t_my_numbox *x) x->x_lin0_log1 = 0; } -static void my_numbox_loadbang(t_my_numbox *x) +static void my_numbox_loadbang(t_my_numbox *x, t_floatarg action) { - if(!sys_noloadbang && x->x_gui.x_loadinit) + if (action == LB_LOAD && x->x_gui.x_loadinit) { sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update); my_numbox_bang(x); @@ -858,7 +858,7 @@ void g_numbox_setup(void) class_addmethod(my_numbox_class, (t_method)my_numbox_dialog, gensym("dialog"), A_GIMME, 0); class_addmethod(my_numbox_class, (t_method)my_numbox_loadbang, - gensym("loadbang"), 0); + gensym("loadbang"), A_DEFFLOAT, 0); class_addmethod(my_numbox_class, (t_method)my_numbox_set, gensym("set"), A_FLOAT, 0); class_addmethod(my_numbox_class, (t_method)my_numbox_size, diff --git a/pd/src/g_radio.c b/pd/src/g_radio.c index 6a7f2e0a6ce286cd09b4cf8f9630ca868a398054..eaf924e87b4e7ef64de1b24d68a0ab7c2882e931 100644 --- a/pd/src/g_radio.c +++ b/pd/src/g_radio.c @@ -419,9 +419,9 @@ static int radio_newclick(t_gobj *z, struct _glist *glist, int xpix, int ypix, return (1); } -static void radio_loadbang(t_radio *x) +static void radio_loadbang(t_radio *x, t_floatarg action) { - if(!sys_noloadbang && x->x_gui.x_loadinit) + if(action == LB_LOAD && x->x_gui.x_loadinit) { radio_bang(x); } @@ -529,7 +529,8 @@ void radio_addmethods(t_class *c) { class_addbang(c, radio_bang); class_addfloat(c, radio_float); - class_addmethod(c, (t_method)radio_loadbang, gensym("loadbang"), 0); + class_addmethod(c, (t_method)radio_loadbang, gensym("loadbang"), + A_DEFFLOAT, 0); class_addmethod(c, (t_method)radio_set, gensym("set"), A_FLOAT, 0); class_addmethod(c, (t_method)radio_size, gensym("size"), A_GIMME, 0); class_addmethod(c, (t_method)iemgui_init, gensym("init"), A_FLOAT, 0); diff --git a/pd/src/g_slider.c b/pd/src/g_slider.c index cc061b6f3532c8faccc207afdbf1692c8d6fcd4c..e4849f5ac6911cd1ec1a9c94ac2810a80b735466 100644 --- a/pd/src/g_slider.c +++ b/pd/src/g_slider.c @@ -483,9 +483,9 @@ static void slider_steady(t_slider *x, t_floatarg f) x->x_steady = (f==0.0)?0:1; } -static void slider_loadbang(t_slider *x) +static void slider_loadbang(t_slider *x, t_floatarg action) { - if(!sys_noloadbang && x->x_gui.x_loadinit) + if(action == LB_LOAD && x->x_gui.x_loadinit) { x->x_gui.x_draw(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); slider_bang(x); @@ -597,7 +597,7 @@ static void slider_free(t_slider *x) void slider_addmethods(t_class *c) { class_addmethod(c, (t_method)slider_loadbang, - gensym("loadbang"), 0); + gensym("loadbang"), A_DEFFLOAT, 0); class_addmethod(c, (t_method)slider_set, gensym("set"), A_FLOAT, 0); class_addmethod(c, (t_method)slider_log, gensym("log"), 0); diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c index 9292f1d083c6977bec74316e8efb581146e7993c..d89c73852202c4b881f69a4f1fe29e4801d88e8b 100644 --- a/pd/src/g_toggle.c +++ b/pd/src/g_toggle.c @@ -328,9 +328,9 @@ static void toggle_fout(t_toggle *x, t_floatarg f) iemgui_out_float(&x->x_gui, 0, 0, x->x_on); } -static void toggle_loadbang(t_toggle *x) +static void toggle_loadbang(t_toggle *x, t_floatarg action) { - if(!sys_noloadbang && x->x_gui.x_loadinit) + if (action == LB_LOAD && x->x_gui.x_loadinit) toggle_fout(x, (t_float)x->x_on); } @@ -440,7 +440,7 @@ void g_toggle_setup(void) class_addmethod(toggle_class, (t_method)toggle_dialog, gensym("dialog"), A_GIMME, 0); class_addmethod(toggle_class, (t_method)toggle_loadbang, gensym("loadbang"), - 0); + A_DEFFLOAT, 0); class_addmethod(toggle_class, (t_method)toggle_set, gensym("set"), A_FLOAT, 0); class_addmethod(toggle_class, (t_method)toggle_size, gensym("size"), diff --git a/pd/src/m_binbuf.c b/pd/src/m_binbuf.c index 69d5c39770dc9b308ec54c530596e4ca0d38b244..9d3582a8d22612a07f539be8b9207fba6db3884b 100644 --- a/pd/src/m_binbuf.c +++ b/pd/src/m_binbuf.c @@ -1697,7 +1697,8 @@ t_pd *glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir) x = s__X.s_thing; vmess(x, gensym("pop"), "i", 1); } - pd_doloadbang(); + if (!sys_noloadbang) + pd_doloadbang(); canvas_resume_dsp(dspstate); s__X.s_thing = boundx; return x; diff --git a/pd/src/x_misc.c b/pd/src/x_misc.c index 75ce3c30f530c3018452db47d159419c7dae05a2..27d489e2a9905f231f4dd465e5cfab927bd9143e 100644 --- a/pd/src/x_misc.c +++ b/pd/src/x_misc.c @@ -117,7 +117,7 @@ static void loadbang_click(t_loadbang *x, static void loadbang_loadbang(t_loadbang *x, t_floatarg action) { - if (!sys_noloadbang && action == LB_LOAD) + if (action == LB_LOAD) outlet_bang(x->x_obj.ob_outlet); }