aboutsummaryrefslogtreecommitdiff
path: root/pd/src/g_hdial.c
diff options
context:
space:
mode:
Diffstat (limited to 'pd/src/g_hdial.c')
-rw-r--r--pd/src/g_hdial.c41
1 files changed, 8 insertions, 33 deletions
diff --git a/pd/src/g_hdial.c b/pd/src/g_hdial.c
index f7267c99..79c87aeb 100644
--- a/pd/src/g_hdial.c
+++ b/pd/src/g_hdial.c
@@ -539,7 +539,6 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
{
t_hradio *x = (t_hradio *)pd_new(old? hradio_old_class : hradio_class);
int bflcol[]={-262144, -1, -1};
- t_symbol *srl[3];
int a=IEM_GUI_DEFAULTSIZE, on=0, f=0;
int ldx=0, ldy=-6, chg=1, num=8;
int fs=8;
@@ -548,9 +547,6 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
iem_inttosymargs(&x->x_gui.x_isa, 0);
iem_inttofstyle(&x->x_gui.x_fsf, 0);
- srl[0] = gensym("empty");
- srl[1] = gensym("empty");
- srl[2] = gensym("empty");
if((argc == 15)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)&&IS_A_FLOAT(argv,2)
&&IS_A_FLOAT(argv,3)
@@ -565,27 +561,7 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
chg = (int)atom_getintarg(1, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(2, argc, argv));
num = (int)atom_getintarg(3, argc, argv);
- if(IS_A_SYMBOL(argv,4))
- srl[0] = atom_getsymbolarg(4, argc, argv);
- else if(IS_A_FLOAT(argv,4))
- {
- sprintf(str, "%d", (int)atom_getintarg(4, argc, argv));
- srl[0] = gensym(str);
- }
- if(IS_A_SYMBOL(argv,5))
- srl[1] = atom_getsymbolarg(5, argc, argv);
- else if(IS_A_FLOAT(argv,5))
- {
- sprintf(str, "%d", (int)atom_getintarg(5, argc, argv));
- srl[1] = gensym(str);
- }
- if(IS_A_SYMBOL(argv,6))
- srl[2] = atom_getsymbolarg(6, argc, argv);
- else if(IS_A_FLOAT(argv,6))
- {
- sprintf(str, "%d", (int)atom_getintarg(6, argc, argv));
- srl[2] = gensym(str);
- }
+ iemgui_new_getnames(&x->x_gui, 4, argv);
ldx = (int)atom_getintarg(7, argc, argv);
ldy = (int)atom_getintarg(8, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
@@ -595,17 +571,19 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
bflcol[2] = (int)atom_getintarg(13, argc, argv);
on = (int)atom_getintarg(14, argc, argv);
}
+ else iemgui_new_getnames(&x->x_gui, 4, 0);
x->x_gui.x_draw = (t_iemfunptr)hradio_draw;
x->x_gui.x_fsf.x_snd_able = 1;
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
- if(!strcmp(srl[0]->s_name, "empty")) x->x_gui.x_fsf.x_snd_able = 0;
- if(!strcmp(srl[1]->s_name, "empty")) x->x_gui.x_fsf.x_rcv_able = 0;
+ if (!strcmp(x->x_gui.x_snd->s_name, "empty"))
+ x->x_gui.x_fsf.x_snd_able = 0;
+ if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
+ x->x_gui.x_fsf.x_rcv_able = 0;
if(x->x_gui.x_fsf.x_font_style == 1) strcpy(x->x_gui.x_font, "helvetica");
else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times");
else { x->x_gui.x_fsf.x_font_style = 0;
strcpy(x->x_gui.x_font, "courier"); }
- x->x_gui.x_unique_num = 0;
if(num < 1)
num = 1;
if(num > IEM_RADIO_MAX)
@@ -621,11 +599,8 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
x->x_on = 0;
x->x_on_old = x->x_on;
x->x_change = (chg==0)?0:1;
- iemgui_first_dollararg2sym(&x->x_gui, srl);
- if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, srl[1]);
- x->x_gui.x_snd = srl[0];
- x->x_gui.x_rcv = srl[1];
- x->x_gui.x_lab = srl[2];
+ if (x->x_gui.x_fsf.x_rcv_able)
+ pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
x->x_gui.x_ldx = ldx;
x->x_gui.x_ldy = ldy;
if(fs < 4)